At least 29 people were killed and dozens were wounded in an 18-hour shooting spree in northeastern Thailand that ended in an overnight standoff at a busy shopping mall.