Ignore <style> elements with a media attribute

This is the same logic which appeared in pull request #24 but was never merged. Includes unit tests.