preserve single spacing and treat img as inline element

i ran into a couple of edge cases where the HTML was not being preserved properly after it was beautified. i think it comes down to the fact that HTML does allow for single spaces to be interpreted as spaces in the content.

for example

```
<img src='test.jpg'> this is a test image
```

will beautify incorrectly to

```
<img src='test.jpg'>this is a test image
```

in digging deeper, i found a few other edge cases in similar nature (particular with spaces after tags not being preserved.

the following PR address this, and adds a few more tests to show that the library is still in a fully functional state. i also added <code>img</code> to the unformatted list to prevent new lines from being added after <code>img</code> tags, since they are inline elements much like <code>span</code> tags.

let me know if you are interested in additional tests or feel the changes could be cleaner.