Set SERVER_NAME on torpedo/fog build tasks.

Updates the torpedo and fog build tasks so that we set SERVER_NAME
correctly. This fixes build issues in some configurations.

Also, adds an explicit failure when torpedo/fog fails to build.