Make CakeRoute::persistParams() more tolerant

Subclasses and instances may not always define persist options.
CakeRoute should be accepting of these differences.

Fixes #3957
Remove duplicate code.

The conditions for persistParams() work should be self contained. Remove
this duplication.