added an as_csv class
refactored mcmc_writer to take an as_csv object to write
moving as_csv to stan::common::io::as_csv
adding unit test for as_csv
refactoring mcmc_writer to take different arguments