storage: implement archiving policy

This is a first step towards unifying entities archive storage based on
a template. The templates are for now hardcoded, but the next step will
be to have them defined via the REST API.

Change-Id: I0f277fba479b2f978ffddc5f788d5c4414468df9