To query the customers table by ID and only get one result back, you can use customerTable.LookupAsync(customerId) - this will throw an exception if it fails to find a record with the specified ID so its more like Single rather than SingleByDefault.
You mentioned that you want SingleOrDefault, but the code in your constructor assumes that you have a valid reference, so this makes me think that LookupAsync is exactly what you want (better to get an exception that says "no customer with ID: 999 found" than simply a NullReferenceException).
One more tip: don't refresh the entire Azure portal when you just want to see if your data has been saved! There is a refresh button on the bottom of the page when you have the browse tab open. Its much faster
1. At the moment we see some developers working with their script directly within the UI while others write scripts in a separate editor and paste them in. We are working on a command line interface for Mobile Services which includes direct script upload - expect to hear more about this very soon.
When it comes to local testing, the most common pattern used at the moment is to extract as much of your logic as possible into a seperate object or set of functions and to unit test those. Unfortunately we do not have a local test environment or harness that you can use to test the entire script.
When it comes to debugging, you can use the console object to write to your logs which are available on the 'logs' tab in the portal. This is very useful when it comes to figuring out what is going wrong in a script.
2. There is a bunch of existing functionality that scripts can access using require(). We run scripts in node.js so standard node libraries like 'querystring', 'crypto', etc are all available for scripts to use. There are a few other libraries that we also make available - for example you can require('request') to get a great library for working with HTTP, and require('sendgrid') in order to send emails via the popular SendGrid service.
When it comes to reusing your own code, we recognize that we do not really enable this yet beyond copy/paste and we are actively working on addressing this issue.