Pass by value for Example that are copied

Example is copied in the implementation; the best practice is to pass by
value here.
Use const pointer for ExampleGroup
Implement before each hook