Measurement of electrons from semileptonic heavy-flavor hadron decays in pp collisions at √s =7  TeV