Deprecate list patterns without list constructor

Currently only warn, make error later. Also take the chance to export
pattern checking functions.
Check pattern in (set pat expr) shell command

Only first version so far, will clean up when fixing handling of
builtin shell commands.