Mesh attribute binding fix and the indexed draw function

Should be accepted after #33 (includes those changes).

Fixes #31 and #32.

Any suggestions on how to make indexes more usable are always welcome ;)