Add scope attribute to classes promise. RM #1941

By setting scope => namespace, it's possible to define a global class
from an agent bundle, and a local class in a common bundle.

Includes testcases for new scope attribute.
Merge pull request #493 from baptr/agent_context_scope

Add scope attribute to classes promise. RM #1941