title: Center-align legend title and legend keys in ggplot2 for long legend titles
body: <p>I am having a hard time making the title of a legend center-aligned relative to the legend keys when the legend title is long. There is a question from <a href="https://stackoverflow.com/questions/41010050/how-to-align-the-legend-title-to-the-middle-of-legend-box-in-ggplot2">a year ago</a> that works for short titles, but it doesn't seem to work for long ones.</p>
  
  <p>Example, first with a short legend title:</p>
  
  <pre><code>library(ggplot2)
  ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width, color=Petal.Width)) + geom_point(size = 3) +
    scale_color_distiller(palette = "YlGn", type = "seq", direction = -1,
                          name = "A") +
    theme(legend.title.align = 0.5)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/XyRIC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XyRIC.png" alt="enter image description here"></a></p>
  
  <p>Everything is as expected, the legend title is centered above the legend key.</p>
  
  <p>Now the same with a long legend title:</p>
  
  <pre><code>ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width, color=Petal.Width)) + geom_point(size = 3) +
    scale_color_distiller(palette = "YlGn", type = "seq", direction = -1,
                          name = "Long legend heading\nShould be centered") +
    theme(legend.title.align = 0.5)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6VpTK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6VpTK.png" alt="enter image description here"></a></p>
  
  <p>We can see that the text is center aligned to itself but not relative to the legend key. I have tried modifying other theme options, such as <code>legend.justification = "center"</code>, but none seem to move the key from its left-most position in the legend box.</p>
  
  <p>A couple of comments:</p>
  
  <ul>
  <li><p>I'm running the development version of ggplot2, v2.2.1.9000 from a few days ago.</p></li>
  <li><p>I specifically need a solution for a continuous colorscale palette.</p></li>
  </ul>