moved select_outputs to libwallet.