Improve mega selection in randoms

Megas now have their own viable moves, so that more unique megas like Heracross, Charizard and Mewtwo can have their viable options.  Someone who knows pokemon more should edit the other megas so that their moves are viable - for now I just copied the same moves their original form has, with a few exceptions.

Potential mega evolving candidates can now be selected without their mega stone.  For example, if the team has Gengar with Gengarite, Heracross without Heracronite can be added.
This line should be modified so that it changes the already defined variable <code>template</code> rather than defining a new one. That would allow getting rid of some instances where <code>megaTemplate</code>'s properties are read in addition to <code>template</code>'s while you can (and should) only read the data for the template with the right moves, abilities, etc.

For example, this is relevant for setting <code>hasStab</code>, just a few lines below.