'cabal configure': honor the '--constraint' flag.

Fixes #1150. Fixes #1564.