Properly planning for the end of a partnership can help minimize the risk of legal and financial issues.