Judge sees dark writings of Michigan high school shooter who could get life in prison