Add a hook to allow entities to run code at configuration time.

fixes #32