Implement the 'apply template' directive.

Refs #5789
Allow arrays as operands in constant expressions.

Refs #5789
Make Value operators const where possible.

Refs #5789
Implement additional operators: &&, ||, in and !in.

Refs #5789