Add :javascript filter support.

Also groundwork for additional filter types.

Automated the parse_line so that you can't forget to add one. The test
for '%img' was missing.