Faster _CustomWriteInt method

Uses a lookup buffer of numbers up to 100 (basically from http://stackoverflow.com/a/24418938/136675)