deriveaddresses dumps all generated addresses into a single FlatSigningProvider, which is also used for looking up information for future derivations. @achow101 points out that the growing data structures may unnecessary increase lookup time for later derivations.
Fix this by separating the provider used for lookups (key_provider) and the one we dump things into.
This gives a 10x speedup for a range of 7000 elements, and probably a larger speedup for larger ranges.
