only listen for changes when the tab is active and debounce the update so it doesn't have too big of an impact on typing perf

Signed-off-by: Chris Granger <ibdknox@gmail.com>