in this other answer, Aaron Quinlan stated:
bamtools has a "split" command for exactly this purpose
I can only add that I've just tried it with this simple command
bamtools split -in file.bam -reference
and it works like a charm. the bam file gets split into different bam files, which are suffixed with .REF_xxx.bam by default, which is very convenient.