Various fixes re. type variables

Fixes #75, #82 and #87 
I have another change (local-only for the moment) that moves the `Function` in a constant in `HasClassReferences`, as it's used several times. The code then reads:

```java
    Iterable<? extends HasClassReferences> concat =
        Iterables.concat(typeVariables, ImmutableList.of(returnType), parameterWriters.values(),
            body.asSet());
    return FluentIterable.from(concat)
        .transformAndConcat(GET_REFERENCED_CLASSES)
        .toSet();
```

It could also be rewritten as:

```java
    return FluentIterable.<HasClassReference>from(typeVariables)
        .append(returnType)
        .append(parameterWriters.values())
        .append(body.asSet())
        .transformAndConcat(GET_REFERENCED_CLASSES)
        .toSet();
```