[48134037] fix crash without assigning a JD to candiate and clicking 'save'

This is caused by without checking the selection_opening_id == 0.

Fix it, and also code refactor to split the func from action 'api'

Signed-off-by: Henry Chen <hchen@vmware.com>
[48226601] create unique-index for join-table

Signed-off-by: Henry Chen <hchen@vmware.com>
Merge branch 'master' of https://github.com/vmw-tmpst/heroapp-LetsHire into index
Merge pull request #95 from Henry-CF/index

[48226601] create unique-index for join-table
[Bug 47951151] fix 'no validation if password is blank' bug

  no validation on both new password and password confirmation are
  blank in resetting password page
Merge pull request #96 from wgu/master

UI tune up bundle
Merge pull request #97 from Chunjie/master

[Bug 47951151] fix 'no validation if password is blank' bug
fix typo
Merge branch 'master' of https://github.com/vmw-tmpst/heroapp-LetsHire