Use localized collation in friend picker

Summary:
this diff changes FBGraphObjectTableDataSource to support collation, so that names are categorized and displayed
properly based on the locale of the app.
I've replicated functionality as is present in other FB apps, namely: display collation index on the right, don't show section headers
and collation index if there's too few rows, omit empty section headers, ensure correct lookup from right side (section index) to left side
(section titles). This is also consistent with the Contacts built-in app and the iOS HIG.

Test Plan:
Use Friend picker sample on various localizations (had to add supported locales to its info.plist), ensure collation is displayed correctly.
Ensure tapping on letters in the section index shows the correct section. Ensure selecting rows in the table and tapping "Done" returns correct results
to the caller.

Screenshots:
Before: http://www.facebook.com/pxlcld/8qWl
After:
English: http://www.facebook.com/pxlcld/8qWm
Russian: http://www.facebook.com/pxlcld/8qV6
Japanese: http://www.facebook.com/pxlcld/8qVd

Too few contacts:
Before: http://www.facebook.com/pxlcld/8qWf
After: http://www.facebook.com/pxlcld/8qWs

Reviewers: jacl, jketchpaw, vijaye, suhas

Reviewed By: jacl

CC: platform-diffs@lists, msdkexp@

Differential Revision: https://phabricator.fb.com/D547860

Task ID: 1354966
[ios-sdk] Added @synthesize for new collation property

Summary:
New property was added, but was not synthesized. It appears that this builds okay on Xcode 4.5, but not on earlier versions.
Added a @synthesize declaration for it.

Test Plan:
- Built in Xcode 4.3

Revert Plan:

Reviewers: karthiks, jacl, leon

Reviewed By: karthiks

CC: platform-diffs@lists

Differential Revision: https://phabricator.fb.com/D550064
Create FBGraphUserLocation type

Summary: Created a type for FBGraphUser.location, since the data is different from FBGraphPlace.location.

Test Plan: Ran unit tests

Reviewers: jacl, clang

Reviewed By: jacl

CC: msdkexp@, platform-diffs@lists, bhiller

Differential Revision: https://phabricator.fb.com/D549686

Task ID: 1347757
Merge commit 'sdk-version-3.0.8' into master

@merge-commit: jacl
Fixes property name in FBOpenGraphAction

Summary: The message property was misnamed, and this fixes it

Test Plan: build, unit tests

Reviewers: clang, gregschechte, mingfli, mmarucheck

Reviewed By: mmarucheck

CC: msdkexp@, platform-diffs@lists

Differential Revision: https://phabricator.fb.com/D555633

Task ID: 1400561
Clear cached requests and pictures when session is closeAndClear-ed

Summary:
When FBSession.closeAndClearTokenInformation() is called, we can go ahead and clear out some of the cached data.
Cached requests will have the session's accessToken in the url query params - which can be used as a filter
Stuff from akamai (images) does not have the same. So we just clear all to err on the side of safety w.r.t. privacy

Test Plan:
Manual testing of Scrumptious with lots of NSLogging.
Multiple login/logouts with different users.

Reviewers: jacl, clang

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D551216

Task ID: 1129032
Rename SBJSON to FBSBJSON in iOS SDK

Summary: Rename SBJSON to FBSBJSON in iOS SDK; also updated references in sample Hackbook project

Test Plan:
After refactoring, verified sdk build with the ./scripts/build_distribution.sh script (though I don't have appledocs installed). Then verified Hackbook project builds and runs in simulator.

Let me know if there are other tests for the sdk.

Reviewers: jacl

Reviewed By: jacl

CC: mmarucheck, security-diffs@lists

Differential Revision: https://phabricator.fb.com/D565036

Task ID: 1431284
[ios-sdk] Update samples with launch images that enable iPhone 5 display.

Summary:
iPhone 5 introduces a new display dimension, 640x1136. In order for apps to display
correctly, they need a new launch image named Default-568h@2x.png. Adding launch images
to those samples that do not have them, in all of the required iPhone dimensions.

Test Plan:
- Ran samples in iOS 6 simulator on regular, Retina, and Retina 4" resolutions

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D574453

Task ID: 1734004
Adds global migration bundle support

Summary:
Adds support for global migration bundles, which means -
1) By default all requests pass a migration bundle
2) For internal requests (pickers, etc.) the migration bundle is not changeable
3) For app owned requests, the bundle can be removed, or changed from the default

Test Plan:
Manual testing debugging the server to confirm bundles trigger the right code on the
server in the following situations -
1) no bundle
2) an existing bundle
3) a non existing bundle
4) a bundle with all expired migrations
5) bundle parameter with empty value (e.g. migration_bundle=)

Reviewers: clang, mmarucheck

Reviewed By: mmarucheck

CC: gregschechte, ekoneil, msdkexp@

Differential Revision: https://phabricator.fb.com/D573365

Task ID: 1464508
iOS 6.0 login support w/samples

Summary:
Adds login support for iOS 6.0, including but not limited to --
 * renaming of permissions to denote read requirement where applicable
 * addition of arguments, overloads and enums to support audience selection
 * update of samples that post, to defer publish permissions until action is taken
 * core iOS 6.0 authorization support in FBSession

Test Plan:
Mainly manual testing of impacted samples, including full matrix of login and
permission upgrade, with and without iOS integrated auth, as well as adding
and removing iOS integrated auth part-way through the test process.

Reviewers: mmarucheck, clang, caabernathy

Reviewed By: mmarucheck

CC: msdkexp@, ekoneil, leil

Differential Revision: https://phabricator.fb.com/D577229
acquire the iOS6 advertisingIdentifier, if not opted out, and send it during publish.

Summary: Apple has added a new API in iOS6, and we should use it when available.

Test Plan:
run a publish in all 4 scenarios of iOS5/6 device X all sample applications.
Verify the the build never fails.
make sure to delete the apps on the phone before/after each test.
Only on ios6 should the advertiser_id value be set when publishing to facebook.

Reviewers: jacl, clang

Reviewed By: jacl

CC: vijaye, teck, calvin, msdkexp@, neko-dev@, suhas

Differential Revision: https://phabricator.fb.com/D574669

Conflicts:
	src/facebook-ios-sdk.xcodeproj/project.pbxproj
[ios-sdk] Upgrade project to build with Xcode 4.5 for iOS 6.0 and armv7.

Summary:
Removed references to unsupported armv6 from the project file.

Added quotes around framework search paths to allow for spaces in Xcode install directory path.

Test Plan:
- Ran build_distribution.sh
- Verified framework built for armv7

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D578867
[ios-sdk] Unit tests should link to new frameworks optionally.

Summary:
Unit test project was set to require Accounts and AdSupport frameworks. Making them optional so unit tests run on pre-iOS 6.0
simulators.

Test Plan:
- Ran unit tests on iOS 4.3 simulator.

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D579012
[ios-sdk] Fix cache unit test.

Summary:
Cache unit test was not waiting for both queues to flush before attempting to use cached files, so it would experience
intermittent failures due to a race condition. Added a sync call in two places.

Test Plan:
- Ran unit tests many, many times.

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D579077
Refactor common publish code in HelloFacebook Sample for iOS Sdk 3.0 (for ios 6)

Summary: Refactor common publish code in HelloFacebook Sample for iOS Sdk 3.0 (for ios 6)

Test Plan:
Verified both post actions in ios6.0 simulator.

Revert Plan:

Reviewers: jacl, gregschechte

Reviewed By: gregschechte

Differential Revision: https://phabricator.fb.com/D580174

Task ID: 1749352
Bucketizes the permissions developer model by read and publish

Summary:
This change establishes the developer model that supports the direction of
dissallowing permission requests to users that present both read and publish
permissions in a single request gesture. The specific changes are:
* Adds read and publish versions of permissions properties to certain controls
* Adds read and publish versions of open and reauthorize methods on FBSession
* Deprecates methods and properties that take unspecified collections of permissions
* Updates samples

Note - in order to unblock docs work, we are pushing this with a known build break in
one of the samples. Will fix the sample shortly.

Test Plan: Tested impacted scenarios via samples

Reviewers: clang, mmarucheck, gregschechte

Reviewed By: mmarucheck

CC: chrisp, ekoneil

Differential Revision: https://phabricator.fb.com/D580068

Task ID: 1731992
Fixes broken sample from previous commit

Summary: Per title

Test Plan: Ran HelloFacebook sample

Reviewers: clang, chrisp

Reviewed By: chrisp

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D580427

Task ID: 1731992
Revert "acquire the iOS6 advertisingIdentifier, if not opted out, and send it during publish."

Summary:
This reverts commit 4b156bc87f08633999c361d145676f7256830bc8.

Conflicts:
	samples/Hackbook/Hackbook.xcodeproj/project.pbxproj
	samples/ProfilePictureSample/ProfilePictureSample.xcodeproj/project.pbxproj
	src/facebook-ios-sdk.xcodeproj/project.pbxproj

Test Plan: verify that the build works and tests pass.

Reviewers: jacl

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D581094
[ios-sdk] Fix Scrumptious to handle session invalidation better; don't try to re-close FBSession if it is already closed.

Summary:
Depending on when Scrumptious encountered an invalid session state change, it was not always correctly
presenting its login view.

[FBSession closeAndClearTokenInformation] should not transition state if the session is already closed.

Test Plan:
- Ran Scrumptious on iOS6 simulator and device

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D580143
[ios-sdk] Fix small permission bug in FBSession; remove duplicate copies of launch images in some samples.

Summary:
FBSession was adding "email" to iOS 6 permissions even when not necessary.

Two copies of the launch images ended up being added to three of the samples. This confuses Xcode in some instances,
plus is just plain redundant. Removing the duplicates.

Test Plan:
- Built and ran the three samples on an iOS device

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D581331