`lastModified` should be managed in API instead of DAO

Since Library functionality is tightly bound to `lastModified`, and Library is managed at the API level (as it should be), `lastModified` should also be managed at API level.

It is currently managed at DAO layer of Principals. Please look at Discussions and Content as well.

Leaving it the way it is introduces risk that library entries aren't correctly cleaned from libraries. Pushing Library down to DAO layer is dangerous because other modules such as activity will use it to perform non-substantial updates such as increasing notifications counts.