[engine]Issue #115: Some safe check asserts
[engine]Issue #115: Refactor client and texture state setting to keep code clean.

Actually this would really be needed to be done as a stack state, to push and pop all the state as needed. This is the minimum effort refactor, and if it proves necessary in future, would need to track whole GL state in a stack on our engine side.
[engine]Fix issue #115 completely.

Problem:
1. Was not changing filter state in texture sampler for GL
2. Sampler state GL API depends on the bound texture, so it must be set after a call to glBindTexture. Refactored to make this possible in engine.