Fix: migration deploy failure for memory versioning and archived-space exclusion
Patches two database migrations from issue #144 that failed to apply. The update_memory RPC was blocked because PostgreSQL treats a parameter-list change as a new overload, leaving an ambiguous GRANT; the fix drops the old 5-param signature before replacing it and uses a fully-qualified grant. The match_memories rewrite was at risk of a return-type-change error (new topic_id column); the fix drops and recreates that function cleanly. Migrations 3–6 from the #144 batch can now apply in sequence.