Gunmen locked in a lengthy stand-off with police in Armenia have released their last two hostages after a fresh night of protests shook the capital Yerevan.