Qualgebras and knotted 3-valent graphs