Cache bilinear form action on the Matrix

This saves us from having to go through compile_form repeatedly for the form
action of the bilinear form of a matrix on a function, which is required for
solving linear systems with boundary conditions.