A big batch of bug fixes.
Merge remote-tracking branch 'origin/misc-fixes' with 'upstream/refactor' into misc-bug-fixes

Conflicts:
	gamemode/modules/base/sh_createitems.lua
	gamemode/modules/base/sv_entityvars.lua
	gamemode/modules/doorsystem/sv_doors.lua
Merge pull request #823 from Bo98/misc-bug-fixes

A batch of bug fixes (for the refactor branch).