Add error handler to detect unhandled Promise errors.

Use unhandledPromise-errback.
Fix bug: RuleControler.prototype.reloadRules getting stuck after an error.

Before requesting new rules, we deleted the old rules
to clear the cache. This lead to a moment where requests
to `reloadRule` where answered with a KeyError, because
the rule was pruned. When reloading  of a rule failed, because
of a syntax bug in the cps for example, the reloadRule method
was blocked forever.
Fix: false positives in atImport recursion detection

Add test: false positive in atImport recursion detection
FIX: a previous merge removed the invalidation of the recursion detection
Merge pull request #311 from graphicore/fix-atImport-Bugs

Fix at import bugs