bug#2926: make BuildLineArray() dynamic

Requesting some expert eyes here. This PR fixes [bug#2926](https://cfengine.com/dev/issues/2926) by removing static buffer usage in BuildLineArray(). Please thoroughly tear it appart :-)

All acceptance tests pass including #1298 recently written by Ted and one supplied by Henri in the Redmine ticket.