fix(links): remove circular reference from instances

Having the arrays of links stored on the instances was causing circular
references and causing infinite loops with certain methods. The
collections are in the closure scope of the instance functions.
Functions are no longer prototype methods but are instance methods in
order to support the closure variables.