BOSTON — Sales of single-family homes in Massachusetts plummeted in July when compared to the same month last year, reversing a trend of 12 consecutive months of increases and reflecting a weakened real estate market nationally, according to two reports released Tuesday.