The next-generation BMW 3 Series has been spied for the first time, with both petrol and electric variants on the way.