Check for empty parameters and remove them.

Mirrors remove_empty_pars in RStan.
Mirror minor changes in RStan
Follow RStan's refactoring of stan_fit.hpp
Update wrapping of stanc
Update documentation and tests for new optimizing return format