mir: add debug assertion to check polymorphization
mir: add debug assertion to check polymorphization

This commit adds some debug assertions to `ensure_monomorphic_enough`
which checks that unused generic parameters have been replaced with a
parameter.

Signed-off-by: David Wood <aa743a0aaec8f7d7a1f01442503957f4d7a2d634@davidtw.co>

graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust