Mass segregation and elongation of the starburst cluster Westerlund 1