Fix/nested provide and empty AMD deps

Implements fixes for supporting dependency-free AMD:

```js
// before empty set required even if no deps
define([], function myThing() { return true; });

// after: omit it!
define(function myThing() { return true; });
```

And supporting loadrunner `provide` in blocks like UMD conditionals (which previously exploded due to naive AST expectations):

```js
(function (window) {
  function myThing () { return true; }

  // commonjs
  if (typeof exports === 'object') {
    module.exports = myThing;
  }
  // loadrunner
  else if (typeof provide === 'function') {
    provide(myThing);
  }
  // amd
  else if (typeof define === 'function' && define.amd) {
    define(function () {
      return myThing;
    });
  }
  // browser global
  else {
    window.myThing = myThing;
  }
}(window));
```
Granted, the `provide` patch is still perhaps naive, just a little less so in order to handle this particular case.

Also fixed a null ref that broke some existing tests, and made lib paths relative in tests.