function flatten_views(view) {
    var flatten = [];
    var sub = view._subviews;
    flatten.push(view);
    for(var k in sub) {
      var v = sub[k];
      flatten.push(v);
      flatten= flatten.concat(flatten_views(v));
    }
    return flatten;
  }
Reset a table with nElements empty rows
@param  {cdb.admin.CartoDBTableMetadata} table
@param  {integer} nElements