Restrict the maximum memory pool size to avoid potential DoS issues.
The mechanism is simply to recursively remove the transactions which have the lowest priority until the memory pool is below the maximum size.
compiles and passes tests, but has not been extensively tested
this is intended to replace #3753