Merge-able open dropdown on input focus

Closed previous PR #7 which is not merge-able to the upstream/master , instead create this PR with the same change but merge-able with upstream/master and fixed failed unit test 

Changes: 
- Same changes copied from https://github.com/walmartlabs/typeahead.js/pull/7
- Make sure unit test don't fail on both browser and phantomjs (there's a bug of comparing html content)