Clean up document handling

Correctify access control and stuff
Use a sensible order in teh document create form

fix #47
fix document form

better ordering fixes #47

date-only publishing precision fixes #43