moved components to lib/components

fix codereview settings
A bit cleaner model for flagging viewer load
Created shared and viewer libraries to separate out logic a bit

R=efortuna@google.com

Review URL: https://codereview.chromium.org//147913004