Use local-context first for var lookups

Ensures that browser-globals are not used before using the local context.
Ensured resetting values in for-loops.

Fixes gh-347
Possibly related to gh-344
Fix order of paragraph in docs
Add filepath parameter to swig.run

Allows files to be cached, thus letting extends/includes/import work in browsers.

Fixes gh-349
add test for local-context-first output