imap: Moved utility functions to end of imap.c (Part 1/3)

Moved imap_atom() and imap_sendf() to the end of the file allowing all
utility functions to be grouped together.
imap: Moved utility functions to end of imap.c (Part 2/3)

Moved imap_parse_url_path() and imap_parse_custom_request() to the end of the
file allowing all utility functions to be grouped together.
imap: Moved utility functions to end of imap.c (Part 3/3)

Moved imap_is_bchar() be with the other utility based functions.