1. Assuming that you are able to support yourself financially, what is the longest that a person can stay at a time in the US on a tourist visa? (I am thinking 6 months, but not sure.)
Yes, 6 months is the maximum, but that depends on how much time they stamp in you passport. If your friend looks suspicious they may only give him 2 weeks or 3 months. It's completely up to the immigration officer at the airport.
2. Should you be lucky enough to find work, can you apply for the work visa while still in the US on a tourist visa?
I may be wrong but I think you can only apply for an immigrant visa and not a non-immigrant visa.
You can file for an adjustment of status under these conditions:
It's extremely risky as, officially, you are not allowed to enter the USA as a Tourist with the intent to Immigrate.
3. Should you get the work visa, can you then simply start working, or do you have to leave the US first and re-enter?
I believe you can work even while the application is pending.
I don't know the answers to 4 and 5.