adding sync acrhitecture, implementing

- there's now a background sync process that downloads the profile on
  login and continually syncs with the API
- the sync process has events/tie-ins that other pieces can pull data
  from. for instance, the app tab pulls sync changes from it quite
  successfully.
  the app tab also intializes its data directly from the sync process
  instead of local storage, now.
- the bookmarker now ties into the sync process as well, although it
  doesnt actually work yet.
convert main to function. while not a perfect way of hiding data, makes it harder to grab anything out of scope.