Simplified ResourceManager::removeResource and cleanUpResources

With Qt's foreach there is no need to make a copy of the container when
you're going to modify it, because the macro already makes a copy
(implicitly shared, of course).

Used the Mana::Resource's path member to avoid searching linearly
through the loaded resources.
Work around a Qt bug that broke the chat bar states

Can be reverted after Qt 4.8.5 or Qt 5.1.0 are widely available.
Made the keyboard input a little more reliable

Release events were bubbling out of the chat input and causing the
player to start walking. Now there are a few properties that keep
track of the key states, so that this can't happen.