add a FactoryHelper constraint helper

This constraints helper allows the user to define a function (or any
callable) which will be invoked as-needed to generate the constraints
for the layout.
add an example of using a factory helper