Portugal has sent emergency aid to the resort island of Madeira, where at least 40 people were killed and dozens after flooding and mudslides.