lib: new API for Comparator

Also remove old deprecated classes.

Signed-off-by: Jean Privat <jean@pryen.org>
lib: beef-up the Comparator api and documentation

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