Moved extractSpaces to Shared.hs

Generalised and move the extractSpaces function from `HTML.hs` to
`Shared.hs` so that the docx reader can also use it.
Merge pull request #1344 from mpickering/master

Moved extractSpaces to Shared.hs