Fix Memoizer injection (Fix #11934)

Once a ctor was added with the same number of arguments,
Spring was incorrectly taking the `${omero...wait}` property
as a string. Casting it first to a Long prevents this.
Merge pull request #2026 from joshmoore/rebased/develop/11934-bfmemoizer-dir

Fix Memoizer injection (Fix #11934) (rebased onto develop)