How to rotate an object around a pivot point?

No problem. If you compare the two jsfiddles you should be able to see the commented out code to prevent the static rectangle being added to the scene and adding the rotating rectangle directly to the pivot.