Bug 1122025: Reset state that could affect daemon or system
Bug 1122025: Reset state that could affect daemon or system

This patch resets several properties of bluetoothd's process.

 - The daemon disconnects from any controlling terminal and
   creates a new process group. All child porocesses wil belong
   to that group, making them |kill|-able at once.

 - It resets the file-creation mask, so written file have correct
   permissions.

 - It changes it's working directory to '/'. If the old working
   directory is mounted, the daemon does not block the directory
   from bein unmounted.

hobinjk/system-bluetoothd,mozilla-b2g/platform_system_bluetoothd,andyvand/platform_system_bluetoothd,BruceSunMozilla/platform_system_bluetoothd,hobinjk/platform_system_bluetoothd,tdz/platform_system_bluetoothd