Fixed encryption, implemented more QR server stuff

- Fixed the RC4/Base64 encryption method (seems to be more commonly
known as "gsmsalg").
- Implemented more of the query and reporting server.