wallet2_api + smart pointers
The [wallet2_api](https://github.com/monero-project/monero/blob/a1dc85c5373a30f14aaf7dcfdd95f5a7375d3623/src/wallet/api/wallet2_api.h) uses raw pointers in most situations. In some places, [memory leaks exist if an exception is thrown](https://github.com/monero-project/monero/blob/a1dc85c5373a30f14aaf7dcfdd95f5a7375d3623/src/wallet/api/transaction_history.cpp#L183). In other places, the [memory management isn't specified in the documentation](https://github.com/monero-project/monero/blob/a1dc85c5373a30f14aaf7dcfdd95f5a7375d3623/src/wallet/api/wallet2_api.h#L212) (in this situation, `refresh()` will delete all memory returned by `getAll()`).

So I would like to update everything to `std::unique_ptr` and `std::shared_ptr` - but this will break existing code. So my questions are:

  * Is the effort worth the temporary compilation breakage pain?
  * What downstream systems use `wallet2_api.h` (outside of the official GUI)?