Cleanup and completion of Renderdevice abstraction

On issue #969 I identified problems with the current renderdevice abstraction, this PR includes all my fixes. I have implemented a GLES2 renderdevice (not included in this PR) on this change which works as expected. I haven't found any additional problems with the RenderDevice except for that fontrendering is not abstracted well but thats need to go into another PR.