Fixes #3795: Move r29245 to v1.7 branch (Correctly record that a daemon has been launched)

---svn-pre-commit-ignore-below---

r29245 [[BR]]
Flag that a daemon has been launched when it reports back to the HNP so we avoid re-launching it on spawns against dynamic allocations

cmr:v1.7.3:reviewer=jsquyres
Add missing include