Support dense:thrift and sparse:thrift output formats

I am ok with the dictionary not being affected by output format and just make it hard coded to |. It should really be independent and have its own format.