Extract bridge messaging to class

New class to handle messaging http PUTs to the bridge and downloading
the json state data