broke apart src/stan/command/print.cpp to the main and functions. added unit tests for next_index and matrix_index. made those two functions safer.