- Install the same version of ubuntu on each old computer.
- Use the same account name and setup ssh public key auth on each.
- Install distcc following the instructions here: https://code.google.com/p/distcc/
That gets you "power to compile" exactly as you asked for.
Using the storage as a big nas is a bit more challenging. There are many approaches you could take. You could use cephfs or glusterfs or another distributed file system, but those tend to be complex and have a steep learning curve and take some time to configure and maintain.
Most nas devices expose things with SMB. You could use samba's DFS features to transparently redirect clients which connect to some head node, to various other nodes, depending on the path used. Its not really unified storage, but it may suit your needs.