I'm not familiar with the autonomous systems of the 777 but for a modern autopilot to enter a glide path as a last option as a failover would be a better idea other than to stall the aircraft and falling out of the sky.
I'm not so sure. I know that the Boeing design philosophy differs from the Airbus design philosophy in that it gives more autonomy to the pilots and has fewer automatic protections. In the case where there are no pilots that might backfire (although I guess ultimately it wouldn't make much difference). In addition I wouldn't expect that a modern autopilot has a reaction built in for a complete engine failure, since it's never supposed to happen.
My guess is that it would just try to maintain altitude, pitching up further and further as the plane slows down, possibly until it stalled and dropped like a brick, or possibly pitching down at some point to avoid stalling, which would still cause it to fly into the ocean at high speed and a steep angle. At some point the autopilot would probably disengage, since most autopilots are programmed to do so automatically when the plane's attitude becomes too erratic, after which there's no telling what the plane would do but it seems very unlikely that it would calmly glide towards the water (and hit it so evenly that it wouldn't break up).