Add mechanism that allows module and external code to register custom order number generators - TRUNK-4270