Fix GC pauses by reusing canvas elements

This fixes #1349.