Thailand's constitutional court has removed Prime Minister Srettha Thavisin from office for breaching the constitution over a cabinet appointment.