Issue 7719,9845,9846 - fix anonymous enum and forward reference problems

[Issue 7719](http://d.puremagic.com/issues/show_bug.cgi?id=7719) - enum forward reference error when enum is in braces
[Issue 9845](http://d.puremagic.com/issues/show_bug.cgi?id=9845) - enum value should be able to contain forward references in global scope
[Issue 9846](http://d.puremagic.com/issues/show_bug.cgi?id=9846) - regression of forward references

Issue 9846 is a regression from 2.063a.