Using Builder pattern to construct Filter and ResultSpec objects.

- Currently memory leak issue as "new NoteFilterBuilder()" is never
  deleted.
- Need to use references in builder.
Replaced pointer in builder classes with references.