pandapub: add plugin settings, a simple client, and add to INST

Adds a PandaPub client and settings UI. This commit doesn't add any new
functionality or feature that use PandaPub - just the plumbing.

running and configuring PandaPub:
 * Start up a local PandaPub instance. Easiest way is with Docker:
     docker run --rm -ti -p 49000:3000  -e ADMIN_USERNAME=admin \
                -e ADMIN_PASSWORD=password zwily/pandapub:latest
 * Log into PandaPub at:
     http://$(boot2docker ip 2>/dev/null):49000/admin
   with admin/password.
 * Create a new application named "canvas"
 * Create a new key with an expiration date in the future. Record
   the key_id and secret.
 * Log into Canvas and go to PandaPub plugin settings:
     base_url: http://{DOCKER IP}:49000/
     application_id: <id from created application>
     key_id: <id from created key>
     key_secret: <secret from created key>
 * In your PandaPub admin section, open the "Console" tab for your
   created application. In the "Subscribe" section, enter "**" in the
   input box, and hit "Subscribe". This will show you the first 50
   events that arrive for the canvas application you just created.

test plan for settings:
 * Verify that the /plugins/pandapub settings page works, saving,
   disabling, etc.

test plan for client via console:
 * Set up and configure PandaPub in Canvas
 * Open a Rails console
 * Run this command to post a pandapub message:
     CanvasPandaPub.post_update("/public/foo", {"a" => 1})
 * Verify that the message showed up in your PandaPub console.

Change-Id: Ifddcbd335293c2a29f532b1e5fd44c23c8b910c4
Reviewed-on: https://gerrit.instructure.com/40311
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
pandapub: classes for integrating pandapub into the browser

test plan:
 * This commit introduces some unused new classes, there's not a great
   way to manually test them.

Change-Id: I266b777480fc00085357e775d040be60f61c2e35
Reviewed-on: https://gerrit.instructure.com/40321
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
QA-Review: Zach Wily <zach@instructure.com>
pandapub: integrate with wiki page updates

test plan:
 * Set up and configure PandaPub. (See commit with change id
   Ifddcbd335293c2a29f532b1e5fd44c23c8b910c4 for instructions.)
 * Open a wiki page in a course in one window.
 * In another window, open the same page, and edit it, and save it.
 * You should right away see the warning pop up in the original
   window that the page was edited while viewing.

Change-Id: I5afcbd34f79385d6466cbbc7c9fc9c211126cf0d
Reviewed-on: https://gerrit.instructure.com/40477
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
Updated pl translation

Change-Id: I15d069d0d4ff68b982ff2a6ddc326a9ff90d3647
Updated ar translation

Change-Id: I107b662a2eb04e77a678cfcee7c8b8633f416d5b
Updated pl translation

Change-Id: I3f76079374f85895587e975bd28e6f6f5a66f7cc
Updated pt translation

Change-Id: I276a34af580fa6cbdde9e70b435c9a721e082823
Updated pt-BR translation

Change-Id: I744fba795c17a105be194f1da315e96331a81109
Updated zh translation

Change-Id: If73860d2de1ec0f7d25b1c71c0b6c007666d5b11
spec: fix missing sharding_spec_helper requires

These files were only working before because an always-loaded file was
requiring the helper for them.

Change-Id: I1704d998ebfdc100455dfa63d37a30827664288d
Reviewed-on: https://gerrit.instructure.com/43323
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
Reviewed-by: Shawn Meredith <shawn@instructure.com>
DA - quiz dates for observers

fixes CNVS-15954

test plan:
  - as a teacher make some differentiated quizzes
  - go to the quiz index, it should work
  - as an observer with no students
    - go to the quiz index
    - quizzes dates should load (no spinning arrows)
      - (if they dont have a date thats fine, they
        just cant be stuck loading)
  - as an observer with students
    - go to the quiz index page
    - it should load the quizzes your student(s)
      can see

Change-Id: Ieeaac8c986afff37724513121113cbdd37fd47d0
Reviewed-on: https://gerrit.instructure.com/42098
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
DA - eportfolio discussion link

fixes CNVS-16170

when a user cant see a DA'ed assignment there
is no longer a link to access it

test plan:
  - make a DA'ed discussion
  - make some comments on as a student
  - take away visibility to this student
  - add it to your eportfolio as the student
  - there should not be a link to go to the discussion
    when viewing as the student
  - as the teacher or a student with visibility, there
    should be a link to go to the discussion

Change-Id: Id72c39985f74b2f52b27edf70923bcb9d75f7ab2
Reviewed-on: https://gerrit.instructure.com/42973
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
spec: fix assignments_student_spec for draft state

refs #CNVS-15563

Change-Id: I3c62392c421ed3ab009e2ff41328333514a78549
Reviewed-on: https://gerrit.instructure.com/43341
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
spec: refactor context modules selenium specs for draft state

refs #CNVS-15563

Change-Id: Ic68e0374f820b4e37814f2e585d1d046993489ef
Reviewed-on: https://gerrit.instructure.com/43329
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
spec: refactor some assignment selenium specs for draft state

refs #CNVS-15563

Change-Id: Ib9230a74045751b098e94078d0d9cccf792da464
Reviewed-on: https://gerrit.instructure.com/42302
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
remove per account cpu statsd metrics

These haven't proven to be very useful, and they add a lot of graphite
load.

Change-Id: I5b23dc41c51e2d7d081b0d02edd1a10a6499a31e
Reviewed-on: https://gerrit.instructure.com/42969
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
fix CollectionAssociation#distinct for rails 4

the signature of the method changed, so we can simplify

Change-Id: Ie579809d3dfe6c93383eb5edbae16b1c7f4b07fa
Reviewed-on: https://gerrit.instructure.com/42071
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
rails 3 always marshal cache writes

so we don't need to force marshalling in tests

Change-Id: Ia12f0ed55281f5691a304e6e82bf796cb0da39a0
Reviewed-on: https://gerrit.instructure.com/43233
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
refactor keeping multiple copies of a specific cache key into a helper class

Change-Id: I7fd54391837e70fcb21b16573e2eb73cf533eb03
Reviewed-on: https://gerrit.instructure.com/42490
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
refactor content_item methods

test plan
 - specs should pass

Change-Id: I0e5253ba139913d533ab87a75ec897e9ad4e1e0c
Reviewed-on: https://gerrit.instructure.com/42923
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>