Refactored Backbone.Firebase.sync and added tests

Added code coverage for `Backbone.Firebase.sync`.