Use inherited() to keep track of metric subclassing

Rails offers the method subclasses, but it relies on ObjectSpace which
might not be available in every Ruby implementation. In addition, it is
costly to iterate over the possible classes everytime.

Although the value could be cache it is easier to simply implement
self.inherited and add the subclasses to a class variable which is made
accessible.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>