Add switching and barrier function materials

This adds the required helper materials that provide various switching and barrier functions. Closes #4355.