CB-6024: Use nopt instead of optimist in cli

Why:
 - Optimist was killed by the author (he recommends minimist as replacement)
 - We already use nopt in plugman cli
 - Make cli parsing cleaner

 Changes:
 - No more manual parsing of the args array
 - cli vars for plugin add passed down as part of opts, not part of targets
 - cli is now a regular function rather than a class, it was never properly
   used as a class.
 - Flags to be passed to platform run scripts are parsed by nopt.
 - To pass arbitrary flags unknown to cli down to platform scripts,
   they must be separated by " -- " from other args, for example:
   cordova compile ios -- -d --foo=bar
   anything after " -- " will not be interpreted by the cli.