Refactor Searchable#filter

This change adds a Pattern class for general pattern matching (kinda
like the case equals operator), as well as Object#attribute for getting
an object’s attribute value (and nil if it doesn’t exist). Go reek!