Implement back-end of storing application resources (eg Last ID)

For #231 and #192 
The back-end is ready. API coming in the next PR, or I can push it here too if it is preferable