On gravity’s role in the genesis of rest masses of classical fields