Fix returned value of parseint. Closes #5649

Also adds tests to cover parseint(::Char...) methods