Wavelet time extraction
The length of the arrays you get back depends on the mode you use to do the decomposition and the wavelet length, which can vary like you see between db1 and db2:  

len(cA) == len(cD) == floor((len(data) + wavelet.dec_len - 1) / 2)


If you switch to periodization mode mode='per', you get a different calculation that may be more consistent for you:

len(cA) == len(cD) == ceil(len(data) / 2)


Regardless, decomposition is generally dyadic, so your dyad width is len(signal)/len(cAn).

Once you go muiltilevel (use level='2', etc.), you'll have small variations in length as well. To account for this, use IDWT to reconstruct.