Support for exposing blocks.

Basic support for exposing blocks in the iteration. Block indices can be taken either from the front or the back (see test/test.js).