clearly establishes what macro bundles are

Previously it was enough to just extend scala.reflect.macros.Macro, which
created some loopholes, but now scalac enforces that bundles:
  1) Are static (not necessarily top-level, but just static)
  2) Are traits (objects shouldn't be bundles anyway, and classes bring
     complications with their ctors which require special treatment in
     generated classes, so why support them if they don't bring anything
     new to the table?)
  3) Are monomorphic (again, this brings unnecessary complications wrt
     auxiliary code generation, so I don't see merit in supporting
     polymorphic bundles, whatever that a polymorphic bundle could mean)
  4) Don't provide concrete implementation for Macro.c (if they do then
     what is the point?)
gets rid of randomness in virtual filenames for bundles

Bundles are emitted in compilation units that wrap virtual source files.
Previously we had those virtual files named randomly to ensure freshness,
but that led to infinite compilation loops in SBT (see the commit message
for more details and a link to a scala-user discussion).

Now the names are generated deterministically from full names of bundles,
which fixes the problems with SBT.
macro bundles are now usable in repl

One of the previous commits relaxed the top-level restriction for bundles,
turning it into a requirement of staticness (i.e. bundles nested in static
objects are also okay now).

This means that we can now define bundles in repl. Almost.

There's still a little problem remaining that arises from the fact that
when compiling a line of input, repl doesn't automatically import all
previously defined symbols, but rather uses an heuristic to scan the
input and guess what symbols need to be imported.

Unfortunately for bundles, this heuristic fails, because when scanning
a macro definition that looks like `def foo = macro Macros.foo`, it thinks
that it's only necessary to import a term symbol called Macros (a vanilla
way of defining macro impls), but not a type symbol called Macros (a new
way of writing macro impls in bundles).

This commit fixes the problem by making the repl look for both term and
type symbols corresponding to the identifiers used in macro definitions.
Merge pull request #2994 from xeno-by/topic/bundles

assorted fixes for bundles