A series of blasts hit three of the most popular tourist resorts in southern Thailand, killing two people and injuring dozens.