Health-care giant Johnson & Johnson is splitting off its consumer division, following in the footsteps of other big drugmakers that have moved to focus on the more-profitable pharmaceutical market.