Revert "Revert "Make al_fopen_fd not leak a FILE handle in a failure path.""

This reverts commit baec08157d0348dcab30c66cd5416854dc0ece44.