Made several efficiency improvements; also, fixed profile-acl2.

Quoting :doc note-7-0:
  We have made several efficiency improvements (arguably heuristic in
  nature), which may apply in many settings but especially in
  handling of several forms during the execution of [include-book]
  --- most notably with-output forms, as (with-output ... FORM) is
  now essentially just FORM during include-book. For some details,
  including statistics showing up to 1/3 of [include-book] time
  eliminated by these changes (and even significant time saved
  outside incldue-book), see the comment about ``efficiency
  improvements'' in Community Books file system/doc/acl2-doc.lisp,
  form (defxdoc note-7-0 ...). Thanks to Sol Swords for noticing
  inefficiencies that led us to these improvements, and for helpful
  discussions.

Fixed several issues with centaur/memoize/old/profile-raw.lsp.  It
might still not be as it ideally "should" be, but at least it worked
for me after these fixes, with (profile-acl2) followed by a
substantial include-book that did memoization.
Merging with a message required by git, sheesh.