filters: Templatize linear convolutions.

Signed-off-by: Cyril Hrubis <metan@ucw.cz>