An Essex council has asked the High Court to stop the owners of a hotel housing migrants, following weeks of protests.