Once you've tackled the source of the odors, a good way to eliminate
any residual odor is to leave used coffee grounds sitting out in a tub
or pan for a few days. The coffee grounds will absorb and neutralize
most other odors, and once you remove the grounds, leave the boat
smelling relatively fresh. I've used this technique in houses and
cars, but never had a need to use it on my boat, as she is a very dry
boat...
Starbucks will give you a 5 lb. bag of used coffee grounds for free.