Nets upend Bobcats 97-87