String to int conversions with base argument support

Another minor nit: I think it'd be nicer to keep the conditionals all checking for specific classes, and have the final else handle an unknown class.  ie it was confusing since I thought this was the block for handling when None is passed as the last argument and I was confused why it would raise an error.