Fix various memory allocation bugs and resource leaks.

Various bug fixes, including:

- Fix memory allocation in parser which used sizeof (char *).
- Fix memory allocation for MD5 digest which used sizeof (unsigned char *).
- Fix potential memory leak in vty_read_config.
- Fix potential memory leak in check_include.
- Check for CONTENT_LENGTH before allocating memory.
- Free memory if realloc fails.
- Remove redundant close in vty_use_backup_config.