PHOENIX-933 Local index support to Phoenix

Updated pull request after resolving conflicts and handling James review comments.
This change is not required in the master branch James. In local-index branch join queries have failed with ColumnNotFoundException with local indexes when join query has columns other than index. So I have added the check. 
Currently join back from data table is not supported in join queries.