[refactor] Move maxAgeInvalid from baseClient to cachinglayer
Moving it there, we only need the same code once instead of four times
Move default maxAge code from src/cachinglayer.js to src/remotestorage.js
It turns out that there is no link from remoteStorage.local to remoteStorage
itself, so in order to access remoteStorage.connected and remoteStorage.getSyncInterval,
this code needs to live in src/remotestorage.js.
Add tests for default maxAge behavior
As discussed in the PR discussion, when you leave maxAge undefined,
it should default to false when not connected, and to 2 * the sync interval
when connected.

There was also a discussion about making the default maxAge requirement a
"soft" requirement when offline, but we decided not to do that within the scope
of this PR.

Due to the complicated feature loading system, I had to expose RemoteStorage.SyncedGetPutDelete
in order to be able to test its behavior. I tried to mock one of the local stores
before including src/remotestorage.js in such a way that my mock would get picked
up by the normal feature loading, but this was so difficult that I gave up, and
decided to just expose SyncedGetPutDelete on the global RemoteStorage class, and test
it on there.
Removed gCl & gTl functions, replaced by querySelector.
Moved helper functions to the bottom.
Widget cipher in working condition.
Merge branch 'bug/631-maxAge_param_check' into ahead
Merge remote-tracking branch 'menyalmog/feature/677-widget_cipher' into ahead