swap TrialFunction and TestFunction variables to match naming convention

Do the rest of #283 (no functional change)