Thanks a lot Pavle,
that is very interesting!
I found that it is unavoidable to have these bogus samples at the end (and beginning) of compressed audio files, but there is some additional information in the MP3 tags that tells you how many samples should be dropped from the beginning ("ENC_DELAY") and end ("ENC_PADDING") of the MP3 for correct gapless playback:
Foobar2000 allows to show these tags (right click on track -> properties):
It seems both Winamp an Foobar2000 honor these tags for perfect gapless playback.
It would be very cool if Mediamonkey would also support this!