Documentation html fix

Here is a number of html fixes for the html files. I've checked all the html files in *doc* folder, and they will be valid html once this pull request is merged.

In fact, I'm trying to make the doc more machine readable, such that it would be easier to generate extern files for [haxe](http://haxe.org/) or declaration files for TypeScript.

My plan is to convert things like:
```html
<dt id="getLineNumber"><code>doc.getLineNumber(handle) → integer</code></dt>
```
into something similar to:
```html
<dt id="getLineNumber" class="method">
  <span class="owner">doc</span>.<span class="name">getLineNumber</span>(<span class="argument" data-type="lineHandle">handle</span>) → <span class="return" data-type="integer">integer</span>
</dt>
```
Do you have any opinion? I will make another pull request if you think it is good to go.