Multistage two-dimensional magneto-optical trap as a compact cold atom beam source.