fix -Wall warnings on OS X with AppleClang

I turned on -Wall when compiling with AppleClang on os x and discovered a few warnings. I was able to successfully fix all warnings. 

At the moment, I'm just checking this didn't break any tests on other platforms. I'll add another comment when this is ready for testings.

http://trac.mantidproject.org/mantid/ticket/10686