Add mask operation on graph and filter graph primitive

Implementation for a "project" function and use it in the filter graph primitive.

Closes #39.