WIP: Make grate_attribute_pointer() more VBO-like

This is only compile tested and may not work at all.

Signed-off-by: Thierry Reding <thierry@gilfi.de>