Multi backend

Foundation for support of multiple storage backends. For now, this implements only the native (pickled) backend, which we already have. SQL backend using SQLAlchemy is to come…