Stop using deprecated Data::{get,set}FinalBlockId()

This commit also fixes several build failures with gcc-8 and guards
against a potential crash in WriteHandle::onSegmentDataValidated()

Change-Id: I054f0f8e55f225c293e74fa219b6ee3103dd8e46
Refs: #4526
diff --git a/tools/ndngetfile.cpp b/tools/ndngetfile.cpp
index dbc5b5d..4d26763 100644
--- a/tools/ndngetfile.cpp
+++ b/tools/ndngetfile.cpp
@@ -167,7 +167,7 @@
   uint64_t segment = name[-1].toSegment();
   BOOST_VERIFY(segment == (m_nextSegment - 1));
 
-  const ndn::name::Component& finalBlockId = data.getMetaInfo().getFinalBlockId();
+  auto finalBlockId = data.getFinalBlock();
   if (finalBlockId == name[-1]) {
     m_isFinished = true;
   }