Bug 1042939 - Alarms, periodic sync, notifications refactor r=millermedeiros

_Note_: This is a work in progress!

### Summary of changes

There are a few different pieces of functionality affected.

#### Periodic sync

1. When the calendar starts, if periodic sync is enabled, we should write an alarm to mozAlarms to wake us up for periodic sync.
2. If the user changes the periodic sync interval, we should revoke any previous periodic sync alarms and issue a new one at the modified interval.
3. When we get woken up by a periodic sync alarm, sync and then issue a new alarm.

#### Notifications

1. When we receive an event reminder from the alarms api, send a notification via the notifications api about the reminder. When that notification gets clicked, navigate to the alarm url.

### What's coming!!

1. Fix for calendar alarm spam.
2.  Don't start periodic sync until we have a calendar that needs a real sync operation.
3. Calendar opens and stays open after using an alarm.
one way to reduce the amount of flags on this file is to cache the previous `sync` promise while it is still executing and set it to `null` when the sync is finished.. so the code would look more like this:

```js
var syncPromise;
function sync() {
  if (syncPromise) {
    return syncPromise;
  }

  syncPromise = new Promise((resolve) => {
    debug('Will request cpu and wifi wake locks.');
    var cpuLock = navigator.requestWakeLock('cpu');
    var wifiLock = navigator.requestWakeLock('wifi');
    debug('Will sync.');
    app.syncController.all(() => {
      debug('Sync complete! Will release cpu and wifi locks.');
      cpuLock.unlock();
      wifiLock.unlock();
      syncPromise = null;
      resolve();
    });
  });

  return syncPromise;
}
```