Casting from string to real type for right filtering and sorting

SQLite treats data as string type. Therefore, filters containing numbers as conditions like "data <= 10" haven't worked to find matching entries. Moreover, sorting of columns in datatable has been shown in strange order. (This issue is similar to http://stackoverflow.com/questions/18796923/why-is-sqlite-treating-a-number-as-a-string) 

This pull request contains two fixes.
 * When a value for a filter is numeric, it is cast as real type in SQL query.
 * When a name of column contains '-val', the column is sorted in numerical order.