Search for anomalous production of events with three or more leptons in pp collisions at sqrt(s) = 8 TeV