Add some missing cases to Compilable/Executable

- Provide a Shape for ShapedValue (to make it Executable).

- Remove the Rep restriction from executableIsCompilable.

- Provide real instances for Executable (which used to be a phantom
  type for functional dependencies with null values) so that it can
  provide a toNode implementation for non-Rep Executables.

- Prevent WrappingQuery type from leaking out of UNION operations.

Tests in TemplateTest.testCompiled.