Generalize menu clone behavior.

When a menu is to be created, it is cloned using jQuery.clone. This is problematic if the underlying objects have attached behavior (for instance, they are angularjs directives).

This modification adds a 'cloner' option which the caller can override and implement their specific behavior. The default is to invoke jQuery.clone as in the current implementation.