Implemented the local database. Also implemented the synchronization ser...

...vice that periodocially checks the local database for unsynchronized reports and attempts to upload them.