A new way to objectively measure chronic pain could lead to new treatments for the common condition that can be debilitating