Add a source file for Indexer class

- Move some non-performance critical methods to the source file
- Fix some implicit declarions of members in iomanip
- Fix declaration order in Makefile.in