Update doubly-linked-list.js

Expanded functionally for more varies use cases.