Apple now has the lion's share of the global smartphone market, knocking Samsung off the top spot for the first time in 12 years.