Many code cleaning, small optimizations and credits added.

- readd the quadric helpers functions to simplify the writing of a PV proxy.
- fix the possible wrapping issue

Change-Id: I4471af9a88f32b3f8d9823f627c822413241676f
Merge topic 'SmallEnhancementsOnHTG' into master

38c8f6eb Many code cleaning, small optimizations and credits added.