Moved functionality to service class

Moved scanning functionality to service class. Some bugs still need to
be worked out.
Fixed continuous scanning bug

Fixed bug where phone would keep scanning after service was stopped.
Added automatic-data-sending ability.

Added the ability for the app to automatically post its data to the
server and then clear the scan cache on regular intervals. The scan
cache is not cleared unless the data is successfully sent, and the app
correctly does nothing if no internet connection is available.