Bug 886576 - Fix scrolling cancelling locked dynamic toolbar animations. r=kats, a=lsblakk

Move the margin animation-cancelling call into the margins-pinned check block
in LayerMarginsAnimator to make sure margin animations aren't cancelled by
scrolling when margins are locked.
Bug 895023 - Null-check SVG image document's root frame, before dereferencing it. r=seth, a=lsblakk