Is it possible to keyframe visibility of every object in the scene at the exact same time in Blender 2.79?
You can run a small Python script to make all objects visible and insert keyframes:

import bpy

for every_object in bpy.context.scene.objects:
    every_object.hide = False
    every_object.hide_render = False
    every_object.keyframe_insert(data_path="hide")
    every_object.keyframe_insert(data_path="hide_render")


You would need to copy that into a new text block in the text editor in Blender and hit the Run Script button. 

However I do not believe this will be of much help to you, unless the 'glitch' where everything becomes invisible to the camera is caused by you accidentally keying visibility of objects.

Glitches in Blender are really not that likely. Usually it is safe to assume that you did something wrong or did not do something right if you observe some glitch-like behavior. It would be logical to try to figure out what that was in order to fix it. That should at least be the first thing to do.