clean shutdown for --upgrade
explicit NULL checks
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel