Research shows workplace humor is a double-edged sword—great jokes can boost status, but failed attempts often backfire. Here’s how to “think funny” without risking your career.