Court documents reveal troubling history of officer involved in fatal Maine shooting.