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