fix memleak and segfault
Merge branch 'v8-upgrade' of https://github.com/triAGENS/ArangoDB into v8-upgrade

Conflicts:
	arangosh/V8Client/arangosh.cpp