No ethernet/wireless connection after dist upgrade - "network UNCLAIMED"

This question turned out to have two answers, both suggested by @JosephR in the comments.

1) Fixing the /lib/modules/3.5.0-030500-generic/build: No such file or directory error while trying to install the ethernet driver just needed a sudo ln -sv /usr/src/linux-headers-$(uname -r) /lib/modules/$(uname -r)/build - after I did that, the driver install from source worked fine, and I got an ethernet connection.

(Presumably repeating the process with the driver for the wireless controller would have made that work too, but I didn't actually try, due to solution #2.)

2) It turned out that if I just booted with the other kernel that was already installed (3.5.0-41-generic instead of 3.5.0-030500-generic - I don't actually know what the difference is), both the ethernet and the wireless worked fine!

It also solved some other problems I was having after the upgrade. So I changed the default boot kernel to that, and will probably stick with that unless I run into other issues.