Added current doc to history. Issue: #415
Get the user from the session so we don't have to pass it in every time. Issue: #415
Write the log even if we cannot determine the current user. Issue: #415
Small code cleanup. Issue: #415
Split audit.log in to 'create' and 'update' as we need to pass the generated docid to create. Issue: #415
Repackaged module as 'audit/log'. Issue: #415
Refactor so the audit lib is a wrapper for the db lib. Issue: #415