Path resolution based on OpenNI2.dll directory with xnOSGetDirName() fix

Hi OpenNI folks,

Here is a patch to address the issue I pointed out in the community at http://community.openni.org/openni/topics/search_path_for_redist_files. With this patch, the path for the drivers and OpenNI.ini will be resolved based on OpenNI2.dll's directory so that the users are no longer required to launch the application from the designated directory. It also allows them to use the shared driver repository just by setting PATH environment variable to its master OpenNI2.dll.

This patch includes three commits as follows. All the details are explained in their commit comments.
- Commit 1: Fix of an issue of Windows version of xnOSGetDirName(). Even if you did not agree on the path resolution fix, I believe you would like to merge this bug fix.
- Commit 2: Fix of the path resolution, which is the main part of this contribution. There are some features that I personally believe no longer needed (or possibly even confusing) but left untouched.
- Commit 3: Patch to remove the features I personally believe no longer needed. You can exclude this commit if you do not agree on my suggestion explained in the commit comment.

I hope this patch to be reviewed (and accommodated if you agree) as early as possible since this is an external behavior change that may impact on the beta users although it is (I believe) a significant improvement.

Please get back to me if you have any questions.
Thank you very much,
Tomoto