Thailand grieves in elaborate final goodbye to King Bhumibol