[SON-HIVE Voting] Refactor sidechain plugin to use sidechain lists of active sons for deposit/withdrawal/primary wallet processing and approvals

The goal is to separate voting for Bitcoin and Hive SONs, so that they can act independently of each others. All code affected by this change should be refactored, in a way that enables that Bitcoin SON and Hive SON are considered separate entities.

This is mostly related to properly populating list of expected SONs to confirm/sign a subject of SON processing.

eg:

   class son_wallet_object : public abstract_object<son_wallet_object>
   {
      public:
         static const uint8_t space_id = protocol_ids;
         static const uint8_t type_id  = son_wallet_object_type;

         time_point_sec valid_from;
         time_point_sec expires;

         flat_map<sidechain_type, string> addresses; <<=== This one
         vector<son_info> sons;
   };
   class son_wallet_deposit_object : public abstract_object<son_wallet_deposit_object>
   {
      public:
         static const uint8_t space_id = protocol_ids;
         static const uint8_t type_id  = son_wallet_deposit_object_type;

         time_point_sec timestamp;
         uint32_t block_num;
         sidechain_type sidechain = sidechain_type::unknown;
         std::string sidechain_uid;
         std::string sidechain_transaction_id;
         std::string sidechain_from;
         std::string sidechain_to;
         std::string sidechain_currency;
         safe<int64_t> sidechain_amount;
         chain::account_id_type peerplays_from;
         chain::account_id_type peerplays_to;
         chain::asset peerplays_asset;

         std::map<son_id_type, weight_type> expected_reports; <<=== This one
         std::set<son_id_type> received_reports;              <<=== This one

         bool confirmed = false;

         bool processed = false;
   };
   class son_wallet_withdraw_object : public abstract_object<son_wallet_withdraw_object>
   {
      public:
         static const uint8_t space_id = protocol_ids;
         static const uint8_t type_id  = son_wallet_withdraw_object_type;

         time_point_sec timestamp;
         uint32_t block_num;
         sidechain_type sidechain = sidechain_type::unknown;
         std::string peerplays_uid;
         std::string peerplays_transaction_id;
         chain::account_id_type peerplays_from;
         chain::asset peerplays_asset;
         sidechain_type withdraw_sidechain;
         std::string withdraw_address;
         std::string withdraw_currency;
         safe<int64_t> withdraw_amount;

         std::map<son_id_type, weight_type> expected_reports; <<=== This one
         std::set<son_id_type> received_reports;              <<=== This one

         bool confirmed = false;

         bool processed = false;
   };
Edited by serkixenos