shm: Use memfd_create when possible

It doesn't require shared memory dir and thus allows
to avoid cases when this dir is detected incorrectly,
as in https://bugreports.qt.io/browse/QTBUG-71440

Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
2 jobs for master in 2 minutes and 27 seconds (queued for 41 seconds)