change _doRender() check

Close #778 

When `detach()` is called, we call `this.element.remove()`. However, `element` is still non-null. Thus, if we just check `this.element != null`, then we'll go ahead and call `this._paint`, which will call `colorScale.scale` on some elements. This in turn makes the domain nonempty again. This change makes the correct check in `_doRender()`. 

Additionally, since we detach plots sequentially, one detach on one plot will update the scale, triggering the listeners on the other plots. The other plots will call `_render()`, though they will eventually get detached. This means, if a plot is scheduled to be rendered, then detached before it can be rendered, it will still try to call `_doRender()` later. I'm not sure if this is something we should worry about, but this check should also make sure that later `_doRender()` call will be unsuccessful.