Search for magnetic monopoles and stable particles with high electric charges in 8 TeV pp collisions with the ATLAS detector