Performance of electron reconstruction and selection with the CMS detector in proton-proton collisions at root s=8 TeV