A Perth suburb has closed all of its beaches after high levels of E. coli were found five days after the removal of a rotting whale carcass.