Add buffer type

This PR adds an abstract buffer type, which serves as a unified interface for variaous buffers, both wayland based and internal ones.
I guess this can be merged with the previous check...