Cleans up a data.table in R to have unique rows and only the columns passed to the function.