Dissipation-induced coherence and stochastic resonance of an open two-mode Bose-Einstein condensate