Thailand’s military seized power Thursday in a bloodless coup, dissolving the government, scrapping the constitution and dispersing groups of protesters from both sides of the country’s political divide who had gathered in Bangkok and raised fears of a violent showdown.