Fixed issues with --noapi

Fixed issues with --noapi where miner would not start unless the miner
was already running and added ability to start miner minimized.