I would like to focus on something you said:
I repeatedly consider scenarios where I am under-performing and our friendship would begin to sour.
This is an important phrase. It would be true if either you or Bob were unable to separate job from personal life. Therefore, I suggest you prepare yourself mentally to be aware that this does not happen (something you should do in any job actually).
I think that many here will agree on the perils that exist when one starts doing that. IMO, it is not professional to confuse or mix those two, as in this case a problem in one of them would have repercussions on the other, and vice-versa.
Although we are human beings, and companies are in essence bunches of humans cooperating together (were each one has its feelings and social aspects), part of being a Professional worker is that one is able to do such separation from professional life and personal life.
To put it in other words, the fact that some work project is not going as expected should have nothing to do with the "degree" and depth of the friendship (if any) that you have with your coworkers.
How could we make it work in a professional sense but also retain the benefits of and protect our friendship?
I suggest you give a good thought to the situation exposed before. If you feel that you are unable to do such separation, and you value Bob's friendship, I strongly suggest you refrain from taking such job.
If not, then I see no problem with you taking such job. In fact, it could actually be a great opportunity to take your friendship to another level, perhaps to strengthen it if handled properly. Even more, if you are truly good friends, I am sure your work dynamics between you two would be better than any other you may probably have with a non-friend coworker, and that would surely be profitable and positive for all.
As a last suggestion, after giving this a good thought, consider having the same discussion with Bob. That way you can expose your worries to him, and make him see that even though you would like that job your friendship is more important to you.
Together, you can determine if this course of action is safe for both parts, or if it is better to refrain from working together and settle with "just" being great friends. Remember to be really sure about what you decide, as this situation could have more negative consequences than positive ones if not handled correctly.