Bug 1022869 - Reparent template contents owner document. r=peterv