Control Arduino via Wifi -- libraries

There seems to be a bunch of libraries that enables control of an Arduino via Wifi. There is:

  1. ESP8266WebServer : Very basic, and allows you to run a web server
  2. aRest - A restful service - seems much more complete.
  3. Use Arduino's wifi library: https://www.arduino.cc/en/Tutorial/WiFiWebClient

There are other platforms like IoTgo, Blynk etc. that abstracts most of these things.

I was wondering what library is best, if the Arduino can act both as a webserver as well as a webclient?
The first two option seems like a webserver, and the third seems like a nice web client. Are there other options? Any libraries that are not only stable, but well-tested and has easy extensions would be nice.

I was wondering what library is best

The one that works with the hardware you have. Two of the three libraries you listed work with different hardware.

Yes, but neither works both as client and webserver. So, technically it doesn't really fulfill the requirement.
So, the device will be able to ping some cloud service (acting as client) and be able to control the device via phone (acting as webserver)

Anyways, seems like ESP8266 library is a good place to start.
It has now support for Https etc.