Solutions for low screen resolution in Ubuntu 14.04/14.10 and VirtualBox

On my test installations of Ubuntu 14.04 in VirtualBox, I had to figure out how to deal with a situation where the highest screen resolution I could get was 640 x 480. And it was not just with Ubuntu 14.04, but also with Kubuntu 14.04.