Move all storage selector logic into correct middleware
Add popit option to storageSelector middleware

This allows popit to use the popit-api storageSelector middleware, which
exposes the models in popit-api to the main application. Eventually this
will mean that we can just have one set of models in the API which both
applications can use. This means that popit UI can save changes to
models and they will still use the popit-api model layer (which ensures
they get indexed into elasticsearch etc).