Armenian Prime Minister Nikol Pashinyan has resigned in an attempt to force an early parliamentary election.