Apple wouldn't permit this in the AppStore
http://omz-software.com/pythonista/
http://omz-software.com/editorial/
http://twolivesleft.com/Codea/
You just can't have an app that downloads external code and then runs it; if all of the code that gets run is prepackaged in the app bundle or user-generated then it's absolutely fine.
Yes, but they may do so only by embedding Apple's own sandboxed WebKit component. So the downloading, execution, and results are tightly controlled.
I'm sure I've seen a Lua environment like this.