Resolve issue #163

Fixed and assert on changing material, and we now map the material to the MATMGR by name instead of type.
Merge pull request #283 from thecelloman/issue163

Resolve issue #163: Material Editor Crash- Opening the material editor with a mesh selected doesn't open a custom material.