Added the getLastValid function for findblock cron
Updated findblock cron to use block->getLastValid
Merge pull request #1890 from mxaddict/master

Pull request for findblock cron fix, related to orphaned blocks.