message: Small performance optimization for INV checking
  There is no need to go through the loop twice to check whether the INV's
  are valid or not.  Right now it's not a big issue, but with higher
  txn rates we'll have more bathed INV requests.
  Also added a clarifying comment regarding inv.type == MSG_TX
diff: @@ -5590,15 +5590,6 @@ bool ProcessMessage(CNode *pfrom, std::string strCommand, CDataStream &vRecv, in
  dosMan.Misbehaving(pfrom, 20);
  return error("message inv size() = %u", vInv.size());
  }
  - for (unsigned int nInv = 0; nInv < vInv.size(); nInv++)
  - {
  - const CInv &inv = vInv[nInv];
  - if (!((inv.type == MSG_TX) || (inv.type == MSG_BLOCK)) || inv.hash.IsNull())
  - {
  - dosMan.Misbehaving(pfrom, 20);
  - return error("message inv invalid type = %u or is null hash %s", inv.type, inv.hash.ToString());
  - }
  - }
  bool fBlocksOnly = GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY);
  @@ -5611,6 +5602,12 @@ bool ProcessMessage(CNode *pfrom, std::string strCommand, CDataStream &vRecv, in
  boost::this_thread::interruption_point();
  const CInv &inv = vInv[nInv];
  + if (!((inv.type == MSG_TX) || (inv.type == MSG_BLOCK)) || inv.hash.IsNull())
  + {
  + dosMan.Misbehaving(pfrom, 20);
  + return error("message inv invalid type = %u or is null hash %s", inv.type, inv.hash.ToString());
  + }
  +
  if (inv.type == MSG_BLOCK)
  {
  LOCK(cs_main);
  @@ -5642,7 +5639,7 @@ bool ProcessMessage(CNode *pfrom, std::string strCommand, CDataStream &vRecv, in
  inv.hash.ToString(), fAlreadyHaveBlock, fImporting, fReindex, IsChainNearlySyncd());
  }
  }
  - else
  + else // If we get here then inv.type must == MSG_TX.
  {
  bool fAlreadyHaveTx = AlreadyHaveTx(inv);
  LOG(NET, "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHaveTx ? "have" : "new", pfrom->id);
  