fixed loss functions.
add rank-to-learn dir.
Merged in hotfixes (pull request on Bitbucket private repository)

hotfixes - fixed bugs in loss functions