model: Bug fixes and small API change in ndn.cxx

ndn.cxx API need to be back-ported back, since it has important and not
very obvious problem.

Refs #1011 (http://redmine.named-data.net/issues/1011)
diff --git a/ndn.cxx/name.cc b/ndn.cxx/name.cc
index 3bb2416..c0a1a57 100644
--- a/ndn.cxx/name.cc
+++ b/ndn.cxx/name.cc
@@ -92,7 +92,8 @@
         break;
       
       string::const_iterator endOfComponent = std::find (i, end, '/');
-      append (name::Component (i, endOfComponent));
+      name::Component comp;
+      appendBySwap (comp.fromUri (i, endOfComponent));
 
       i = endOfComponent;
     }