Renames filter to base_filter and weight to base_weight

filter is a python builtin function so importing it pollutes ones name
space.

It is now renamed to base_filter.

We also rename weight to base_weight, just to be consistent in the
naming conventions.

We add a test for base_filter.

Fixes bug 1175829

Change-Id: I46e0fa696d2f39081b5568c701b0a70c54f271ab
Merge "Renames filter to base_filter and weight to base_weight"