Add a method to retreive the 2i indexes from a model.

Allow models to have indexes attached by returning the indexes map.  Also
add appropriate tests, structured after the other 2i test.