refactor: break apart base.DEPRECATED for component reuse.

* lib/std/base.lua (DEPRECATIONMSG, getcompat, setcompat): New
functions, factored out of...
(DEPRECATED): ...here.  Simplify accordingly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>