This fixes a UB when amount is min int64_t.
Backport of core#20406.
Unlike core we don't have a dedicated ValueFromAmount function, it's using the implicit cast operator.
The static_assert are moved to Currency where they belong.
Before this fix the displayed result would be messed up (like --92233720368547758.-8).
Depends on D20443.