In tag helper, honor html_safe on arrays; also make safe_join more similar to Array.join

Currently, the tag helper honors the html_safe on its parameter values, so you can do something like `tag('a', href: 'http://example.com?a&amp;b'.html_safe)`.  However, with array values (_e.g._ when supplying multiple classes) the strings are concatenated together with `Array#join` and escaped without regard to the prior `html_safe` status.  This patch resolves the inconsistent behavior, as demonstrated by several tests.  I have also included a test for the empty array, since that's an easy one to break if you do it wrong.

I can't actually see a valid use case for supplying `html_safe` string values; in my opinion people should just supply the raw string and not try to micromanage how Rails escapes strings when using these helpers.  However, as long as we are going to escape values sometimes, we should do it consistently.

**Update:** to get certain tests involving nested array parameters to pass, I had to update `safe_join` to be more similar to `Array.join`, calling `flatten` first.
can you use `flat_map` here?