Fixed global variables and missed semicolons.

Added all missed semicolons, and the var keywords were needed to avoid global variables. Example:

Old:

Observer.tokenize = function(keypath, interfaces, root) {
    tokens = []
    current = {i: root, path: ''}

New:

  Observer.tokenize = function(keypath, interfaces, root) {
    var
        tokens = [],
        current = {i: root, path: ''},
        index, chr
    ;