update to latest JIRA API

On JIRA 5.1, the previous code gave the following error:
ERROR SyntaxError: Unexpected token <
support authenticated URLs
remove code duplication
use current versioned REST API instead of latest
Merge
Merge branch 'master' of github.com:github/hubot-scripts