(CDAP-718) Added auto output key/value classes detection to MapReduce.

When getting the `TypeToken` through the `resolveClass` method, it already make sure the type is `Mapper` or  `Reducer`. The Java type system already requires it to have 4 parameters, otherwise the user code cannot be compiled. However, I do agree that as a defensive mechanism, we can do an additional check here.