> wallet: move Assert() check into constructor
>
> This puts it in a function body, so that __func__ is available
> for reporting any assertion failure.
> util/check: stop using lambda for Assert/Assume
> util/check: avoid unused parameter warnings
> refactor: Add LIFETIMEBOUND / -Wdangling-gsl to Assert()
Rationale from PR description:
> Using a lambda creates a couple of odd namespacing issues, in particular making clang's thread safety analysis less helpful, and confusing gcc when calling member functions. Fix this by not using a lambda.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/24714 | core#24714 ]], [[https://github.com/bitcoin/bitcoin/pull/24729 | core#24729 ]] and [[https://github.com/bitcoin/bitcoin/pull/25248 | core#25248]].
This is a requirement for core#25077 because a lambda cannot be used with `LOCK`.