Two recent high-profile cases where Massachusetts prosecutors sought to force journalists to turn over confidential material have press advocates on alert.