Add process history map entry immediately on registration

This is a merge of #598 by Bill. The only change was to rebase on top of CMSSW_7_0_X and then change `Selections` to `SelectedProducts` as Chris did. Find below the result of:

`diff -Naur =(git show cms-sw/refs/pull/598/head) =(git show HEAD)`

```
--- /tmp/zshL4mFUZ      2013-08-27 23:35:30.000000000 +0200
+++ /tmp/zshUwMkgU      2013-08-27 23:35:30.000000000 +0200
@@ -1,4 +1,4 @@
-commit 34485e93d5e3524bb155d9697d1f300c0a7b968b
+commit cc5726f06f205a3b460fbd8210eebf53ac2e98d6
 Author: wmtan <wmtan@fnal.gov>
 Date:   Fri Aug 23 17:38:11 2013 +0200

@@ -604,10 +604,10 @@
            << "The process name " << processName << " was already in the ProcessHistory.\n"
            << "Please modify the configuration file to use a distinct process name.\n";
 diff --git a/FWCore/Framework/src/InputSource.cc b/FWCore/Framework/src/InputSource.cc
-index d32c40d..ce3157d 100644
+index e2efbb3..0f61fe1 100644
 --- a/FWCore/Framework/src/InputSource.cc
 +++ b/FWCore/Framework/src/InputSource.cc
-@@ -604,7 +604,7 @@ namespace edm {
+@@ -601,7 +601,7 @@ namespace edm {
    InputSource::reducedProcessHistoryID() const {
      assert(runAuxiliary());
      //THREADUNSAFE this is modifying global state
@@ -657,10 +657,10 @@
            << "PrincipalCache::insert\n"
            << "Illegal attempt to insert lumi into cache\n"
 diff --git a/FWCore/Framework/src/SubProcess.cc b/FWCore/Framework/src/SubProcess.cc
-index 5de5572..5adab1d 100644
+index 0773add..c309401 100644
 --- a/FWCore/Framework/src/SubProcess.cc
 +++ b/FWCore/Framework/src/SubProcess.cc
-@@ -309,9 +309,9 @@ namespace edm {
+@@ -310,9 +310,9 @@ namespace edm {
      rpp->fillRunPrincipal(principal.reader());
      principalCache_.insert(rpp);

@@ -673,11 +673,11 @@

      parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));

-@@ -471,12 +471,12 @@ namespace edm {
+@@ -470,12 +470,12 @@ namespace edm {
    void
    SubProcess::propagateProducts(BranchType type, Principal const& parentPrincipal, Principal& principal) const {
-     Selections const& keptVector = keptProducts()[type];
--    for(Selections::const_iterator it = keptVector.begin(), itEnd = keptVector.end(); it != itEnd; ++it) {
+     SelectedProducts const& keptVector = keptProducts()[type];
+-    for(SelectedProducts::const_iterator it = keptVector.begin(), itEnd = keptVector.end(); it != itEnd; ++it) {
 -      ProductHolderBase const* parentProductHolder = parentPrincipal.getProductHolder((*it)->branchID(), false, false, nullptr);
 -      if(parentProductHolder != 0) {
 +    for(auto const& item : keptVector) {
@@ -855,7 +855,7 @@

      ++indexIntoFileIter_;
 diff --git a/IOPool/Output/src/RootOutputFile.cc b/IOPool/Output/src/RootOutputFile.cc
-index a25500c..b183cad 100644
+index 57e754b..ae309ad 100644
 --- a/IOPool/Output/src/RootOutputFile.cc
 +++ b/IOPool/Output/src/RootOutputFile.cc
 @@ -409,7 +409,7 @@ namespace edm {
```