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.

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.

Simplifying the code by having the mega template stored in 'template'.
For abilities, the original template is stored in 'baseTemplate'.  Also
added the improved mega selection for Random Doubles, which would be
affected by giving viable moves to megas in formats-data.js.