Tons of work, imported from AmberRabbit

I added cubemap texture loading, statistics methods, various bugs, edit
box charsets, and a few other things