Types: added 'matches' method to Masked<T>

Reviewer: @gregor-bsn @ronaldchl

This PR adds a 'matches' method to the generic masked type Masked<T> that enables queries of the form 'is value x matched by the masked value y", i.e., 'does ipv4 address 1.2.3.4 lie in ipv4masked network 1.2.3.4/024)