Implemented device reset as well as raw API access.
Implemented rasterizer state cache
Implemented mesh caching. Refactored attribute format.
Fixed vertex_format macro and the test.
Added a simple program caching
Merge pull request #316 from sectopod/cache

State caching