Repository: svg/svgo (js)

Issue:
collapseGroups and "inherit" value 
For this file from the SVG Test suite: https://www.w3.org/Graphics/SVG/Test/20061213/svggen/color-prop-01-b.svg

svgo (specifically the `collapseGroups` plugin) removes the outermost `<g>` from this markup:

```svg
<g color="red">
	<g color="inherit" fill="none" stroke="none">
		<!-- inherit to check the property value, not the string, is being used -->
		<circle cx="130" cy="80" r="60" fill="currentColor"/>
		<circle cx="350" cy="80" r="60" stroke="currentColor" stroke-width="4"/>
	</g>
</g>
```

When the attribute is inheritable, and is present on the inner element, but has the value `inherit`, the attribute on the outer group should be maintained.

Pull request description:
Fixes #915 for collapseGroups
When the inner element has the `inherit` value, overwrite with the value from the parent `<g>` element.

Patch:
diff --git a/plugins/collapseGroups.js b/plugins/collapseGroups.js
index f0a1343..6e38651 100644
--- a/plugins/collapseGroups.js
+++ b/plugins/collapseGroups.js
@@ -63,6 +63,8 @@ exports.fn = function(item) {
                                 inner.addAttr(attr);
                             } else if (attr.name == 'transform') {
                                 inner.attr(attr.name).value = attr.value + ' ' + inner.attr(attr.name).value;
+                            } else if (inner.hasAttr(attr.name, 'inherit')) {
+                                inner.attr(attr.name).value = attr.value;
                             } else if (
                                 attrsInheritable.indexOf(attr.name) < 0 &&
                                 !inner.hasAttr(attr.name, attr.value)


Test patch:
diff --git a/test/plugins/collapseGroups.15.svg b/test/plugins/collapseGroups.15.svg
new file mode 100644
index 0000000..411020c
--- /dev/null
+++ b/test/plugins/collapseGroups.15.svg
@@ -0,0 +1,17 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+	<g color="red">
+		<g color="inherit" fill="none" stroke="none">
+			<circle cx="130" cy="80" r="60" fill="currentColor"/>
+			<circle cx="350" cy="80" r="60" stroke="currentColor" stroke-width="4"/>
+		</g>
+	</g>
+</svg>
+
+@@@
+
+<svg xmlns="http://www.w3.org/2000/svg">
+    <g color="red" fill="none" stroke="none">
+        <circle cx="130" cy="80" r="60" fill="currentColor"/>
+        <circle cx="350" cy="80" r="60" stroke="currentColor" stroke-width="4"/>
+    </g>
+</svg>
\ No newline at end of file