Here's everything you need to know about setting up a loan agreement between friends and family to keep everyone happy.