Move <regex> inclusion to C4Include

Since multiple source files may want to use regular expressions, move
the header inclusion before setting up heap debugging.
Add test case for #1060
Validate texmap entries on load (#1060)

This makes sure texmap entries look correct, thus avoiding a crash that
happened when the entry referenced a material without specifying a
texture.

Closes #1060.
Merge branch 'issue1060'