SPARK-4297 [BUILD] Build warning fixes omnibus

There are a number of warnings generated in a normal, successful build right now. They're mostly Java unchecked cast warnings, which can be suppressed. But there's a grab bag of other Scala language warnings and so on that can all be easily fixed. The forthcoming PR fixes about 90% of the build warnings I see now.
Hm, no it should show up by default, and I think this goes back to Java 6. I'm using 8 though. Here's a simple class that is similar to this stanza that triggers it for me:

```
public class Foo {
        void bar() {
                foo(new Class[] { Foo.class });
        }
        void foo(Class<Foo>[] classes) {}
}
```