dfTrials2Long function

Convert data frame with trial records into long format