grim/purple-spasm

fix crash when disconnecting a spasm account but leaving the chat window open (PIDGIN-17578)

Testing Done:
Did the steps from the issue description while running in valgrind. No crash and no invalid read.

Bugs closed: PIDGIN-17578

Reviewed at https://reviews.imfreedom.org/r/1243/
SOURCES = [
'spasm-account.c',
'spasm-account.h',
'spasm-chat.c',
'spasm-chat.h',
'spasm-const.h',
'spasm-plugin.c',
'spasm-rest.c',
'spasm-rest.h',
'spasm-user.c',
'spasm-user.h',
'spasm.h',
]
shared_library(
meson.project_name(),
SOURCES,
name_prefix: '',
dependencies: [PURPLE, GLIB, JSON_GLIB, SOUP],
install: true,
install_dir: join_paths(get_option('libdir'), 'purple'),
)