Added "implicit hypothesis" feature for more efficient meta rules.  Allow profiling with state.

This change arose out of an email thread started by J, who contributed
to its design.  Quoting :doc note-7-0:

  It is now possible to create more efficient :[meta] rules by writing
  metafunctions that create ``implicit hypotheses.'' See
  meta-implicit-hypothesis.

Quoting :doc note-7-0:

    * It is now legal to [profile] functions that take [state] as an
      argument. Thanks to Sol Swords for requesting this change. In
      the course of making this change, we took a conservative
      approach and put the same requirement on memoizing functions
      that take user-defined [stobj]s: that is, the memoization has
      to be a profiling call, meaning that the value is nil not only
      for the :condition keyword but also for the :inline keyword. We
      can probably remove this additional restriction if necessary.

Other tweaks:

- Removed needless lock from memoize-fn-init-2, which was called only
  in the context of with-global-memoize-lock.

- Restored the ability to memoize a function inside the call of a
  memoized function -- in particular, after profiling certify-book-fn
  you can memoize a function inside certify-book.  Thanks to Sol
  Swords for requesting this improvement.  In the process, we have
  cleaned up what might have been an incorrect implementation in the
  case that one needs to grow some structures in order to memoize more
  than about 500 functions.  One consequence is that in this case, if
  a memoized function is currently running, a somewhat scary
  continuable error will occur.

- Fixed profile-all (in books/centaur/memoize/old/profile-raw.lsp),
  which was broken.