Add basic K2 storage framework implementation.

Due to the size of the commit, I'm submitting the unit tests in a separate request.
put the lock in here as well or at least document that this method has to be called while within the lock