server.js has a whole bunch of mixed concerns, part of which was record retreival
and loading/checking user defined rules.
This PR extracts record handling logic as well as user defined rules logic
into their own modules.
Loading/saving records can now be done through a common interface. fetchRecords no longer
holds the assumption that an ip address will be passed in. setRecord no longer requires
passing in a key as the key is stored on the record, and setRecords now only accepts records
instead of it's confusing signature. It's now possible to define non-enumerable
properties on a record that are not saved when serialized.
I started to use async/await to simplify logic where it made sense as well as
started down the path to using native promises in places.
Note, no remote tests are modified, so functionality should be the same.
This is groundwork to simplify the DataFlow integration where a simple API is
needed to fetch records of varying types.