Refactor Inflections#demodulize and improve its documentation

An alternative implementation which reads better than ranges IMO.