Fix crash when cursor theme can not be loaded

Also add a debug message about theme loading failure.
This is not necessarily fatal, some embedded applications could still
function properly without a cursor.

Change-Id: Ib3e2ee43b00630ee77997c7472a95ac5a22c2cc2
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Fix fd leak in case of ftruncate() failure in qwlkeyboard

Change-Id: Id7d6582d4e139763634c7022548b558d4a2f8ec2
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>