GEOMESA-516 Factor out common code in IndexEntry and RasterIndex

* Removed large amounts of duplicated code between IndexEntry and RasterIndex.
* Moved most components into trait.