driver: fix vertex elements issue

The END field of VERTEX_ELEMENT_CONFIG was filled in wrongly.  Compute it correctly now.
driver: correct front_ccw for mesa integration

Mesa flips the y viewport scaling based on screen/framebuffer,
to follow the GL spec. This commit makes sure that the correct CW/CCW culling is used.
driver: framebuffer handling

Most of etna_fb is not currently used in the mesa driver, even
though it has functionality not in mesa, such as determining
an exact match RS format and red/blue swap from
linux framebuffer attributes. Expose this function.
memory management improvements

- proper reference counting in driver
- unlock video memory before free