Add __len__ and __getitem__ to Block.

This makes it possible to use Block in place of an (r, g, b) triple,
allowing for sensible operations like `grid[1, 1] = grid[2, 2]`.