Use Model.remoteMethod instead of loopback's fn.

Rework Todo model to define the remote method `stats` using the new
method `Model.remoteMethod` instead of the deprecated
`loopback.remoteMethod`.