CBQE-1808: add test for 'as' as optional

Change-Id: I87dff70020feaa09fefb233f697db4190514554c
Reviewed-on: http://review.couchbase.org/31358
Reviewed-by: Iryna Mironava <irynamironava@yandex.ru>
Tested-by: Iryna Mironava <irynamironava@yandex.ru>