Cache and keep track of boundingRect.

This is to avoid possible dead pointers in QGraphicsScene's bsp tree
index (a possible fix for #79).