need a `is_tensor_empty` operator to help beamsearch
Created by: Superjomn
Beam search period has a special terminate condition:
when all the candidate sets are empty, that is the LoDTensor which stores the candidates is empty, so such a operator is needed.
This is a branch of https://github.com/PaddlePaddle/Paddle/issues/5580