Optimisations + code cleanup for dcast.data.table

+ Moved 'subset' and 'aggregation' from C- to R-side.
+ Also moved ordering/keying data.table at R-level as well.
+ Added an additional test for 'subset' argument.
+ Much needed reduced clutter at C-level, ex: no "cast groups".
+ 2x speed-up due to a) aggregation before ordering whenever possible, b) using internal reordering which is much more efficient - avoids a lot of (unnecessary) mallocs.
+ Updated '?dcast.data.table' with new timings.

+ Minor: Fixed a broken link - "?forder". It's not yet exported (and there's no ?forder yet).

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1225 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Fixes for dcast.data.table

+ Workaround for segfault in dcast.data.table due to existing bug #5191.
+ Error in dcast.data.table if input DT has duplicated names
+ Error if data to cast is empty
+ Added more tests to dcast.data.table
+ Minor fixes in ?dcast.data.table

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1226 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Wrapping up 'order' and 'setorder'

+ All instances of 'forder' renamed to 'forderv': naming consistency
+ 'fast_order' renamed to 'forder' : naming consistency
+ 'DT[order(x, -y, …)]' automatically optimised to 'DT[forder(DT, x, -y, …)]'.
+ Test added for above change.
+ Updated news with entry for '?setorder' and 'DT[order(…)]' optimisation
Wrapping up 'order' and 'setorder'

+ All instances of 'forder' renamed to 'forderv': naming consistency
+ 'fast_order' renamed to 'forder' : naming consistency
+ 'DT[order(x, -y, …)]' automatically optimised to 'DT[forder(DT, x, -y, …)]'.
+ Test added for above change.
+ Updated news with entry for '?setorder' and 'DT[order(…)]' optimisation

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1227 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Fixed #5376. := adds new cols on empty data.tables as well.
Fixed #5376. := adds new cols on empty data.tables as well.

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1228 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Wrapping up 'order' and 'setorder'

+ All instances of 'forder' renamed to 'forderv': naming consistency
+ 'fast_order' renamed to 'forder' : naming consistency
+ 'DT[order(x, -y, …)]' automatically optimised to 'DT[forder(DT, x, -y, …)]'.
+ Test added for above change.
+ Updated news with entry for '?setorder' and 'DT[order(…)]' optimisation

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1229 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Fixing the mess (learning to rollback using git). Ignore commits from #1228 until here. Reverting to #1227 basically.

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1230 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Wrapping up 'order' and 'setorder'

+ All instances of 'forder' renamed to 'forderv': naming consistency
+ 'fast_order' renamed to 'forder' : naming consistency
+ 'DT[order(x, -y, …)]' automatically optimised to 'DT[forder(DT, x, -y, …)]'.
+ Test added for above change.
+ Updated news with entry for '?setorder' and 'DT[order(…)]' optimisation

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1229 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Merge branch 'refs/heads/r-forge-git-svn-local'
Reverting to #1227 still.
+ by=.JOIN replaces by-without-by
+ consistent "i." prefixes in j
+ more verbose timing in dogroups and setkey
+ 0 and NA now silently skipped in i of := and set()
+ X[Y,colA] now returns a vector, for consistency with documentation
+ X[Y] keeps X's join column in place rather than moving to the front

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1231 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
NEWS item and test for consistency of mult="all" vs "first"|"last" output type and columns, #5378

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1232 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Merge branch 'refs/heads/r-forge-git-svn-local'
.JOIN changed to .EACHI

git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/datatable@1233 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Merge branch 'refs/heads/r-forge-git-svn-local'
FR #5205 done - 'duplicated' and 'unique' gain 'fromLast' argument.

+ Appended ?duplicated.data.table
+ Added extensive tests
+ Updated NEWS
Implemented FR #5172 - anyDuplicated.data.table method

+ Tests added + NEWS updated + ?duplicated updated.
Fix for #5423 - DT[, y := y * eval(parse(text="1*2"))] works fine now without needing to wrap it as y * (eval(…))
Fixed an issue with DT[order(…)] optimisation where it's already sorted. 'forder' returns integer(0) for that case. All good now. Thanks Matt.