gui/html: Finally implementing restore operation

+ modal jQueryUI-based dialogs for restore operation
+ fixing a small bug with NDN/REST API

Unrelated note: unless we do something with JSON compression, we can't request more
than 10 items at a time (I tried 20, and they already didn't fit).

Change-Id: I9206fa9ac6b02062915a6f6980ad9e69eaa8da3c
diff --git a/src/action-log.cc b/src/action-log.cc
index 0a05dd2..eb21b0d 100644
--- a/src/action-log.cc
+++ b/src/action-log.cc
@@ -702,10 +702,10 @@
       action.set_filename    (reinterpret_cast<const char *> (sqlite3_column_text  (stmt, 3)), sqlite3_column_bytes (stmt, 3));
       std::string directory  (reinterpret_cast<const char *> (sqlite3_column_text  (stmt, 4)), sqlite3_column_bytes (stmt, 4));
       action.set_version     (sqlite3_column_int64 (stmt, 5));
+      action.set_timestamp   (sqlite3_column_int64 (stmt, 6));
 
       if (action.action () == 0)
         {
-          action.set_timestamp   (sqlite3_column_int64 (stmt, 6));
           action.set_file_hash   (sqlite3_column_blob  (stmt, 7), sqlite3_column_bytes (stmt, 7));
           action.set_mtime       (sqlite3_column_int   (stmt, 8));
           action.set_mode        (sqlite3_column_int   (stmt, 9));
@@ -774,10 +774,10 @@
       action.set_filename    (reinterpret_cast<const char *> (sqlite3_column_text  (stmt, 3)), sqlite3_column_bytes (stmt, 3));
       std::string directory  (reinterpret_cast<const char *> (sqlite3_column_text  (stmt, 4)), sqlite3_column_bytes (stmt, 4));
       action.set_version     (sqlite3_column_int64 (stmt, 5));
+      action.set_timestamp   (sqlite3_column_int64 (stmt, 6));
 
       if (action.action () == 0)
         {
-          action.set_timestamp   (sqlite3_column_int64 (stmt, 6));
           action.set_file_hash   (sqlite3_column_blob  (stmt, 7), sqlite3_column_bytes (stmt, 7));
           action.set_mtime       (sqlite3_column_int   (stmt, 8));
           action.set_mode        (sqlite3_column_int   (stmt, 9));