Make max number of orphan blocks kept in memory a startup parameter (fixes #4253)