message: split the apply_block and apply_message
  while this function should not be used to create a new ledger state
  it is necessary to have for the block content selection
diff: @@ -353,6 +353,30 @@ impl Ledger {
  new_ledger.settings = settings;
  for content in contents {
  + new_ledger = new_ledger.apply_fragment(ledger_params, content, metadata)?;
  + }
  +
  + new_ledger.date = metadata.block_date;
  + metadata
  + .nonce
  + .as_ref()
  + .map(|n| new_ledger.settings.consensus_nonce.hash_with(n));
  + Ok(new_ledger)
  + }
  +
  + /// Try to apply a message to the State, and return the new State if successful
  + ///
  + /// this does not _advance_ the state to the new _state_ but apply a simple fragment
  + /// of block to the current context.
  + ///
  + pub fn apply_fragment(
  + &self,
  + ledger_params: &LedgerParameters,
  + content: &Message,
  + metadata: &HeaderContentEvalContext,
  + ) -> Result<Self, Error> {
  + let mut new_ledger = self.clone();
  +
  match content {
  Message::Initial(_) => return Err(Error::Block0(Block0Error::OnlyMessageReceived)),
  Message::OldUtxoDeclaration(_) => {
  @@ -379,13 +403,7 @@ impl Ledger {
  new_ledger = new_ledger_;
  }
  }
  - }
  - new_ledger.date = metadata.block_date;
  - metadata
  - .nonce
  - .as_ref()
  - .map(|n| new_ledger.settings.consensus_nonce.hash_with(n));
  Ok(new_ledger)
  }
  