refactored txt bind formating to handle multiple line txt records

This is a backport from Mozilla inventory.

https://github.com/mozilla/inventory/commit/3d669a37b9