Check for a mainClass in "run" task if there is one

If there is a run task with an explicit main it can be used
by the repackage task (assuming its own native setting is
not used).

Fixes gh-389