Replace NULL by nullptr.
Fix indentation.
Merge branch 'master' into cpp11

Conflicts:
	include/entities/CustomEntity.h
Use the auto keyword do avoid verbose iterator declarations.