changed: make CRect/CPoint template classes for underlying type

This allow usage with integer types. It also add a conversion
constructor so that they are interchangeable.
Merge pull request #2086 from elupus/crect

changed: make CRect/CPoint template classes for underlying type