Close all the fds of the child before exec

This patch closes all the fds (starting from 3) of
the child before exec in InstanceTask.

Please see the bug description for more details.

Change-Id: I9f18f88c9c58540ad6358a2a989f344f60be86d8
Closes-bug: #1394300
Merge "Close all the fds of the child before exec"