Add a method for dumping LTSV while preserving order

Copied wholesale from [cb372's PR on Skinny](https://github.com/skinny-framework/skinny-framework/commit/c187344225a3c230ca487bcfb523e337c78c1a2d)