THE STARBURST CLUSTER WESTERLUND 1: THE INITIAL MASS FUNCTION AND MASS SEGREGATION