ext/filter support for validating MAC addresses.

This PR adds support to ext/filter to validate MAC addresses. It partially implements the feature request from bug #49180.