Properly strip reference information from section names

Sometimes HTML is:
  <sup>
    <span>[</span>
      1
    <span>]</span>
  </sup>

This is because this is a configurable message and enwiki configures it to
have the spans.

Bug: 66733
Change-Id: Ibe6a1373ce61d6a616a296ab31ed830adf831727
Merge "Properly strip reference information from section names"