Asymptotic behavior and Hamiltonian analysis of anti-de Sitter gravity coupled to scalar fields