Isolate cipher code and improve it

The proxy password was being encrypted and decrypted in the controller. Also it was using the token which can change easily.
I made a class utils.ControllerCipher and changed the secret to use the device_config.device_id which is more permanent. I added unit tests.