Thai PM threatens critics of government with detention