utils: Fix direction_from_flag()

A system message can also be one that's received or sent.
So check if a message is system message before checking
if it's received or sent.

Also, update tests
8 jobs for wip/sadiq/fix-message-direction in 12 minutes and 32 seconds
Status Name Job ID Coverage
  Build
passed build-debian-gcc-bullseye #304793
librem5

00:02:49

passed build-debian-gcc-buster #304792
librem5

00:02:13

 
  Test
passed check-po #304795
librem5

00:00:24

passed test:debian-gcc #304794
librem5

00:01:26

20.1%
 
  Package
passed package:deb-debian-buster #304796
librem5

00:01:35

passed package:deb-debian-buster:arm64 #304797
librem5:arm64

00:06:22

 
  Test Package
passed autopkgtest-debian-buster-package #304798
librem5

00:01:51

passed lintian-debian-buster-package #304799
librem5

00:00:50