Closes #927. 'set' on .SD errors appropriately, like :=.
Closes #926. Replace i with which(i) as well to save memory.
Added 'validate()' to deal with by= arguments, updated setdiff_.