A couple of bug fixes with ndn::Name class

Also, adding an example to handle (get diagnostic info) library exceptions