[ffmemless] Close file descriptors on exec

Since exec restarts the whole process, there is no point in leaving
the file descriptors hanging around.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
[ffmemless] Move device node setup from plugin load to sink initialize

There is a issue that the file descriptor of the vibra device
gets closed by something unknown in the system. This causes the kernel
to delete all the loaded effects. Subsequently the vibra effects
don't work anymore, unless someone else happens to load effects to
those id slots that ffmemless plugin thinks are still there. I have
straced ngfd, but at least ngfd is not closing the fd.

I found that moving the device opening to sink init instead of
plugin load, the issue dissappears. My theory is that it has something
to do with the plugin loading mechanism, but cannot confirm this
unfortunately.

As the sink init is actually more logical place to initialize the
device node, it makes sense to add this fix in any case.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
Merge pull request #18 from kjokinie/master

Fix issue with ffmemless file descriptor getting closed spuriously