Redmine#4170: adapt to overlong module lines

see https://cfengine.com/dev/issues/4170

With acceptance test.

Changes in behavior:

* don't segfault on overlong module lines
* accept large JSON containers (this may affect other areas, e.g. iteration over containers, if we suddenly iterate over large strings for example!)
* prevent from overlong class names, slists, and scalar variables
* more appropriate error messages in a single place