I'm planning to purchase a second hand iPhone 5s in a couple of days, is there a checklist that I should follow before I purchase the device to ensure that I won't run into troubles later on? Such as iCloud activation lock and such?
The most important thing to do before buying any iOS 7 device is check for activation lock.
I don't want to copy all the steps in case they change, but in a nutshell focus on the text that appears below in a section you need to expand:
How do I check for Activation Lock before purchasing a used device?
When purchasing an iPhone, iPad, or iPod touch from someone other than Apple or an authorized Apple reseller, it is up to you to ensure that the device has been erased and is no longer linked to the previous owner’s account....You will know that a device is ready for you to use when you are asked to “Set up your iPhone", “Set up your iPad", or “Set up your iPod” during the device setup process.
You basically, power off the device and start it and slide to unlock. The Apple document explains in more details what you will see and how to ask the seller to properly unlock things before you take possession of the device. You might also escrow the funds if you can't meet face to face to ensure both parties deliver what they agreed upon.