testing for the case where a p2sh sigscript isn't pushonly.

Also providing a defined error (from NewScript) for that case.
Fix case where we have an empty script that isn't the first.

Silly check needed to confirm it was the first script. Add test for this case.
fix ScriptToAddress when called with 0 length script.

It did work by luck before, but now it works no matter what the template
tables say. Add tests for the other error cases and internal data
assertions.