HPCC-3022 - Allow buildindex not to require maxlength if >4k

For legacy backward compatibility reasons, we have forced the max
key size (key+payload) to default to the max record size, which
in legacy systems used to be 4K. This can been overridden
with ,MAXLENGTH on the record structure.
However, this imposes a unnecessary restriction in the current
system, which has no default max record length and therefore
doesn't need to use a 'max' in the key header at all.

Fix by removing the max length check in the key builder, but for
continued backward compatibility, track the largest key+payload
and store it in the header. If the max is < old default legacy(4k)
set header max to 4K.
This will mean any key built on a new system with this
compatibility option on, will create a compatible key for legacy
system as long as the key+payload <= 4k.
If it is higher, it will issue a warning. Legacy systems can still
use the key, but they will need to specify MAXLENGTH.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge pull request #5507 from jakesmith/hpcc-3022

HPCC-3022 - Allow buildindex not to require maxlength if >4k

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>