Refactored folder_add() to use bailout goto labels.
Documented some semaphore functions.
Extracted folder_node_dispose().
Introduced imap_hierarchy_delimiter field in struct folder.
Rewrote folder_add_imap() to use bailout.