Add support for setting NLSR prefix costs via configuration file and nlsrc

This change alters the nlsr.conf 'advertising' format, as the previous
setup used unnecessary keys which made dynamically adjusting the
stateful conf file difficult.

Incorporates code written by Yanbiao Li.

Change-Id: I3ed5d0a564099be8cc1389ee6acc6f2d04cef889
diff --git a/src/update/prefix-update-commands.cpp b/src/update/prefix-update-commands.cpp
index da43fe7..0e2c3d6 100644
--- a/src/update/prefix-update-commands.cpp
+++ b/src/update/prefix-update-commands.cpp
@@ -26,10 +26,12 @@
 const AdvertisePrefixCommand::RequestFormat AdvertisePrefixCommand::s_requestFormat =
     RequestFormat()
     .required(ndn::nfd::CONTROL_PARAMETER_NAME)
+    .optional(ndn::nfd::CONTROL_PARAMETER_COST)
     .optional(ndn::nfd::CONTROL_PARAMETER_FLAGS);
 const AdvertisePrefixCommand::ResponseFormat AdvertisePrefixCommand::s_responseFormat =
     ResponseFormat()
     .required(ndn::nfd::CONTROL_PARAMETER_NAME)
+    .optional(ndn::nfd::CONTROL_PARAMETER_COST)
     .optional(ndn::nfd::CONTROL_PARAMETER_FLAGS);
 
 const WithdrawPrefixCommand::RequestFormat WithdrawPrefixCommand::s_requestFormat =