Add try..except check for JSON errors to sls shim

This is the same fix as in #13557 for highstate.
We must be able to count on __salt__ being a dictionary-like object

This fix is far from complete. FunctionWrapper in it's current form is
missing ``in`` support, ``.keys()`` support, ``.update()`` support,
maybe more.
Merge pull request #13864 from whiteinge/salt-ssh-sls-dict-tweaks

Tweaks to salt-ssh error handling