Fix a crash caused by a dangling pointer.

I was a bit reckless with my auto usage :)
Add status icons for source controlled files.

Currently just using the SVN/Perforce icons that ship with the editor,
but there aren't enough to represent every possible file status, so I'll
need to add some icons of my own.