msvc9 compatibility

- sqrt in msvc9 needs explicit cast from int
- freak error with cuda & msvc9 when using modulus operator(%)
Merge pull request #459 from goodfeli/master

Bandit
extra explanation in code
Merge pull request #460 from bbudescu/msvc9-compat

msvc9 compatibility
made a check less sensible
fixed bug in convert_to_one_hot (thanks Alexandre Lacoste)
added test for convert_to_one_hot