The price of onions, a staple that has sparked protests in the past and toppled state governments, has jumped to its highest in nearly two years.