The two operations were combined into a single function to factor the `get_address_history` call, but it turns out that in the slow cases that I encountered that call accounts for a minor part of the call time. The first operation is the real bottleneck in large single address wallets that do regular coin consolidation (many inputs, few spent coins). Without consolidation, both operations would be slow.
Some callsites only really need one of the two ouputs, most notably the `add_input_info` which has been found to be a source of GUI freezing.
Split the operations into their own functions that take the address history as a parameter, and keep the original function as a shortcut for when both outputs are actually needed.
Document and add typehints to all touched functions.
Remove an unused and poorly named `get_addr_received` function.