Update JSDoc to make it JSHint-clean

I'd like to contribute to JSDoc, but I'd also like to use JSHint as I code to help me avoid silly errors. Alas, JSDoc is not JSHint-clean...until now!

This pull request updates JSDoc to pass all JSHint checks, assuming you're using the included `.jshintrc` config file. It also adds a test to check for JSHint errors.

The following files are still not JSHint-clean and are excluded from the new test:

* Third-party modules in Jake/ and node_modules/.
* Tests in test/. It seemed okay to let these be linty for the moment.
* lib/rhino-shim.js, which (necessarily) redefines some variables that JSHint considers read-only.

The pull request includes a lot of changes, but the bulk of them are just shuffling code around (see "Function/variable hoisting" below).

It may not be obvious why I made some of these changes, so here's a detailed breakdown of what I did. This is meant to be a complete list, but I may have forgotten something. Let me know if you see a change whose purpose isn't clear.

### Destructuring assignment ###

JSHint doesn't understand [destructuring assignment](https://developer.mozilla.org/en/New_in_javascript_1.7#Destructuring_assignment_%28Merge_into_own_page.2Fsection%29). It turns out that Node.js doesn't either (as of 0.6.19; I haven't checked 0.8), so this change will also help with #93.

To deal with this issue, I changed a few functions and their callers to use objects rather than arrays. This change affected a small handful of function signatures, most notably `jsdoc/tag/type/parse()`.

### Function/variable hoisting ###

JSHint can warn when functions and variables are used before they're declared. This helps to avoid some potentially surprising effects of function/variable hoisting.

The majority of the changes were just moving code around to silence this warning.

### Globals ###

JSHint complained about redefining the read-only global `__dirname`, so I changed this to `env.dirname` and updated all the callers.

Also, each file now indicates which globals it uses, so JSHint can prevent you from typing `foo` where you really mean `var foo`. (In addition to the per-file declarations, the JSHint config file tells JSHint to expect the usual globals for Rhino and Node.js.)

### Object.hasOwnProperty() ###

The fix for #125 made JSHint complain that `hasOwnProperty` is a crummy variable name, so I changed the alias from `hasOwnProperty` to `hasOwnProp`.

Also, there were some `for (var item in foo)` blocks that didn't use `hasOwnProperty` to filter the items. I added this check where necessary.

### Braces around blocks ###

JSHint doesn't like `if()` blocks like this:

    if (foo) return bar;

It wants you to add braces, like this:

    if (foo) { return bar; }

Or this:

    if (foo) {
        return bar;
    }

I added braces as needed, attempting to favor whichever style seemed more prevalent in the file.

### Mixed tabs/whitespace, trailing whitespace ###

JSHint complains about these, so I got rid of them. In files that needed whitespace cleanup, I generally de-tabbed the file as well, since soft tabs appear to be more prevalent in JSDoc.

### Undeclared/redeclared variables ###

JSHint complains about these, including the following construct:

    if (foo === true) {
        var bar = 1;
    } else {
        var bar = 0;
    }

In cases like that one, I did the following instead:

    var bar;
    
    if (foo === true) {
        bar = 1;
    } else {
        bar = 0;
    }

As a result of silencing this warning, some functions now declare many more variables at the start.

### Missing/unnecessary semicolons ###

JSHint flags any code that relies on automatic semicolon insertion, or that includes unnecessary semicolons (for example, after a function definition). I added/removed semicolons where necessary.

### Unused variables/empty blocks ###

JSHint complains about both of these, so I got rid of them as needed.

### Constructor names ###

Lowercase constructor names make JSHint cranky:

    var foo = require("foo");
    var bar = new foo();

I changed that to:

    var Foo = require("foo");
    var bar = new Foo();

JSDoc also doesn't like constructor names that start with underscores, so I changed those, too. I think the only one was jsdoc/tag/dictionary/_TagDefinition.

### Bitwise operators ###

JSHint warns about using bitwise operators where you may not have meant to. So instead of this cleverness:

    return ( ~ foo.indexOf(bar) );

We now have:

    if ( foo.indexOf(bar) !== -1 ) {
        return true;
    } else {
        return false;
    }

### Conditionalized assignment with `&&` ###

JSHint doesn't like this:

    !foo && (foo = {});

I changed that to:

    foo = foo || {};

### Accessing properties ###

JSHint complains if you write `foo['bar']` where you could have written `foo.bar`. JSDoc now uses the latter where possible.

### Self-invoking functions ###

For no especially good reason, JSHint doesn't like this:

    (function () {
        // whatever
    })();

I changed that to:

    (function() {
        // whatever
    }());

### Unsafe characters ###

Thanks to JSHint, "Rafał Wrzeszcz" is now known as "Rafa&amp;#322; Wrzeszcz." You're welcome?