Change make-predicate/define-predicate to use flat-contract-predicate.

Closes PR 14610.
Add tests for generated syntax of static contracts.