Add type checking to list argument in foreach. Create a test to check
that the error is caught.

Change-Id: Id032cd6fb1e27040b86337c71180eab098beb00b
Merge branch 'master' of github.com:mit-cml/appinventor-sources into errorslist
Some corrections, again