Making SVG compression smarter in pre-commit hook

This eliminates many of the problems caused by using svgo with
default settings.

Change-Id: I7b09e89a5a72ff241c38914044b931520311efee
Merge "Making SVG compression smarter in pre-commit hook"