Don't check for active messages

Instead of counting to check whether there are active messages, try to
fetch ids right away and use len on the result. This removes 1 query
from the claim process.

Fixes bug: #1207759

Change-Id: I579d09ed026d0889ded2463d4807154c8259109d
Merge "Don't check for active messages"