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.
Use correct function when assembling cached form action

Replace the coefficient in the cached form action by the currently
passed in Function. Otherwise we'd keep using the Function from the
first call to _form_action.