Add support for specifying custom domain/record name max lengths.

Change-Id: I269fffaae8d6fb3e1462c85a8ac44a470e760628