metrics: move counter to its own module

Signed-off-by: Jean Privat <jean@pryen.org>
metrics: make Counter a genuine Map

Signed-off-by: Jean Privat <jean@pryen.org>
metrics: add Counter#print_summary

Signed-off-by: Jean Privat <jean@pryen.org>
metrics: add POSet#print_metrics

Signed-off-by: Jean Privat <jean@pryen.org>
metrics: add poset_metrics

Signed-off-by: Jean Privat <jean@pryen.org>
metrics: remove useless `all` variable local

Signed-off-by: Jean Privat <jean@pryen.org>
nitg-s: avoid `flatten_class_hierarchy` on intern method static call

just do the lookup on the realmainmodule to avoid flatten on various
mmodules. since the method is intern, the result is the same anyway.

Signed-off-by: Jean Privat <jean@pryen.org>
Merge branch 'poset_metrics'