Implement filters

```php
<?php
$repo = new MyRepository(/* ... */);
// filter is reset upon every query
$repo->getForProject($project);
$repo->getForUser($user);
$repo->getForProjectUser($project, $user);

class MyRepository extends DatabaseRepository
{
	public function getForProject(Project $project)
	{
		$this->filter->filterProject($project);
		return $this->getAll();
	}

	public function getForUser(User $user)
	{
		$this->filter->filterUser($user);
		return $this->getAll();
	}

	public function getForProjectUser(Project $project, User $user)
	{
		$this->filter->filterProject($project);
		$this->filter->filterUser($user);
		return $this->getAll();
	}

	public function getFilterInstance()
	{
		return new MyFilter($this);
	}
}

class MyFilter implements FilterInterface
{
	protected $project;
	protected $user;

	public function filterProject(Project $project)
	{
		$this->project = $project;
	}

	public function filterUser(User $user)
	{
		$this->user = $user;
	}

	public function apply($query)
	{
		if ($this->project) {
			// lots of intricate joins here maybe?
			$query->where('project_id', '=', $this->project->getKey());
		}

		if ($this->user) {
			// lots of intricate joins here maybe?
			$query->where('user_id', '=', $this->user->getKey());
		}
	}
}

```