Four sperm whales stranded on a beach in Indonesia have died despite frantic efforts to push the massive mammals back into the sea.