Add argcheck for indexing into tensor with a table

We check that the number of indices provided is
not greater than the number of dimensions.

This is done for both __index__ and __newindex__.

Also added unit tests for index lookup and index
assignment.
Merge pull request #7 from d11/safer_indexing

Add argcheck for indexing into tensor with a table
Explain how to :index() in existing result tensor
Fix typo
Merge pull request #10 from jucor/doc_index

Document how to :index() in existing result tensor