quad: split into decl+def files

see #84
tests: moving Polynomial tests into own file
tests & quad: a little cleanup