I know this is a very frustrating problem, however have worked out an answer for you below ...
My first recommendation is always to have your cat examined by your vet in case this is some sort of medical problem, I know this is very unlikely as he has had this sort of behaviour problem all along, but this is a point you would not want to miss. If this is not a medical problem then logically it must be a behavioural problem, truthfully this can be a difficult issue to resolve, I know you have tried some of my suggestions I am about to make but here listed below is the sum total of the ideas which I have given to my clients in the past, some of these have worked well, hopefully I can give you some new ideas to try ....
1. When you clean up after where Riley has been dirty use one of the odour eliminator type solution you can get from the vet or pet store. These work as they have a biological action like a washing machine soap powder and digest organic matter. In fact a dilute solution of such a soap powder is a good thing to use as well. If you just use normal soap and water it will smell fine to you but to the cat it will still smell it afterwards, and if the place smells like a public toilet to a cat he may use it as such! Make sure you leave the cleaning agent to soak for a while, this should be fine in the sink anyway.
2. Try moving the cat litterbox, that's often a good thing to do. Best advice is to keep the litter tray well away from food or water bowls because that sometimes could be reason he does not go. Sometimes providing another litter tray elsewhere in the house is a good idea as well.
3. Change your cat litter to another brand which is very different in colour and texture from the brand you are using now. Also consider using earth from the garden instead of cat litter, it is not quite so absorbent as cat litter in terms of smells etc. but it is much more natural for the cat and might bring him back into his litter tray. If this works you can gradually change back to regular cat litter.
4. Some cats start to be dirty in the house because they are marking out their territory in response to some anxiety, another cat in the neighbourhood etc. Products such as Feliway can help here, some of my clients swear by Feliway. I have put a link about Feliway below so you can research this further.
5. Some cats respond to low level tranquilisers where territorial anxiety concerning other cats is a factor but this is a last resort, it often works well though.
I hope I have covered your question fully enough but if you would like further clarification or to talk things over a bit more then I will be on-line for the next hour or so and I will be more than pleased to continue working with you.
Please be kind enough to rate my service to you after we have concluded our dialogue, such feedback helps me maintain the quality of my answers.