Add user info cmd

Add the`$juju user info` cmd to call the recently landed UserInfo API
method. See user docs in user_info.go for an outline of how `juju
info` behaves.
Merge pull request #126 from waigani/user-info-cmd

Add user info cmd

Add the`$juju user info` cmd to call the recently landed UserInfo API method. See user docs in user_info.go for an outline of how `juju info` behaves.
Always close mgo.Iter after use

The documentation for mgo.Itr says that the iterator should be closed after use. Reading the source the difference between Iter.Close() and Iter.Err() is the latter doesn't close the iterator (cursor), but both will return any error that occured so are interchangable in this respect.

Replace all the calls to Iter.Err() with Iter.Close, do some general cleanups and replace fmt.Errorf with errors.Errorf in affected functions.
Ignore empty machine addresses
Merge pull request #135 from davecheney/close-mongo-iterators

Always close mgo.Iter after use

The documentation for mgo.Itr says that the iterator should be closed after use. Reading the source the difference between Iter.Close() and Iter.Err() is the latter doesn't close the iterator (cursor), but both will return any error that occured so are interchangable in this respect.

Replace all the calls to Iter.Err() with Iter.Close, do some general cleanups and replace fmt.Errorf with errors.Errorf in affected functions.
mend
Merge pull request #136 from wallyworld/ignore-empty-machine-addresses

Ignore empty machine addresses

Older versions of juju could write empty machine addresses to state. This messes up the peer address selection when upgrading a nonha env to a ha one. So we add code to ignore such empty addresses.

Fixes: https://bugs.launchpad.net/juju-core/+bug/1329123
Action Watcher can optionally filter on prefix
Add tests for Unit.WatchActions
Refactor filterFn to make loop() function cleaner
one more refactor; simplify watcher struct
1. Don't use Tags internally 2. Log unexpected key value in watcher filterFn
Merge pull request #132 from johnweldon/unit-action-watcher

Unit Action Watcher

Add Unit.WatchActions for filtered action notifications by Unit