Fixed minor input manager bugs and started the sound engine.

Input callbacks will have to be rewritten using functors rather than OOP
liseteners since one object may need many listeners, and anonymouse
inner classes don't exist in c++ (although lambdas in c++0x come close).