Replace defined? in views with local_assigns.

`local_assigns` is the right way to do it: http://stackoverflow.com/questions/2060561/optional-local-variables-in-rails-partial-templates-how-do-i-get-out-of-the-de

One occurrence, `defined?(snippet[:start_line])`, is a bug, since `a = {}; defined? a[:b]` returns `"method"`, not `nil`.