Use JSession to get the session ID
Mock the session
Use JUser::getInstance

This removes half of the JSession dependency in the method.
No session dependency means we don't need session_id check
Merge pull request #266 from wilsonge/patch-27

Use JSession to get the session ID