Judge upholds Massachusetts ban on recreational cannabis sales