purple: no PURPLE_CONNECTION_IS_VALID in 3.x

libpurple 3.x removed this macro from API in favor of an internal one,
not accessible to plugins.