Add compiler options to suppress warning the use of sun.misc.Unsafe in certain places
Update code to either suppress unchecked warnings or, where possible, use properly genericised code