Fixed GLAverageOperation.

Added an operation to create a diagonal linear transformation from a function.

Generalized the -dividedBy operation for functions to handle scalars betters.