Complete classification of second-order phase transitions in two-dimensional systems