Change expiresIn parameter from Integer to Long to avoid overflows. SOCIAL-356
Order by rank instead of selecting connections where rank=1 to ensure that findPrimaryConnection() doesn't return null if there are connections. SOCIAL-341
Merge pull request #108 from habuma/master

Sync-up PR for changes to fix SOCIAL-356 and SOCIAL-341