Implement protect (+@at etc.)

- This also replaces the stack depth analysis code with more detailed
  stack layout analysis.  This should be useful for elimination of
  (some) swaps and rots as well.