lib/collections: add `Collection::has_exactly`

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