Fix auto-order problem in state.template

Use the highstate renderer so we can add correct ordering and state metadata prior to processing.

Refs #13146