Western Australia's Cottesloe Beach has reopened after a shark spent 27 hours inside the netted area.